ResourceCollection: Avoid infinite loop when accessing parent relations.