Modify xml merge algorithm not to add duplicates