Yeah, this is something that torque does. If you delete an object from a set/group, then the last object is put into its index, instead of having to shift all of the other objects down a slot. It can really screw you over if you're not expecting it and using sets/groups as an ordered container.