IIRC the argument for ObjectRef() constructor should be a collection name at the top level of the object tree, that would make this line ObjectRef('port-group'), meaning that you are referencing an object in the top-level 'port-group' collection.