Fix issue with relationship traversal when gathering objects for orphan comparison