Is there a way to remove duplicates that actually merges the two entries? I mean merge in two contexts, so can appreciate an ansswer in two parts:
1 to have the metadata of one be migrated into the metadata of the other, much like reference update function.
2 to have all references to the depreciated entry replaced by those to the kept entry. Current behaviro simply deletes one of the entries, removing all references to that entry (for instance, in reference groups.)