Remove some uses of object_flags