Fix generation of the object_scope