Changes To replaceDuplicateRelationsInlineWithAnchors()