Refactor compiler internal predicate for collecting object resources on behalf of the `object_property/2` built-in predicate