Fixing small bug in PackPrimary (needed to updated pointers after removing inactive objects)