pack-objects: better check_object() performances