rhogen: correctly process SELF_INSTANCE for entities
rhogen: call entity.save before native non-static function