Based on feedback in this PR:
Instead of Loading the relationship map in a forEach loop, create the map by using a collector.
Then rather than clearing the map when moving to the next object to be handled, reset the RelationshipMergeSets. This will eliminate the any mutation in the map keys or value references.
`final Map<String, RelationshipMergeSet> relationships = new HashMap<>();`