I saw that 1.3.6 was out there, so I tested again.
The test setup is:
EA 7.1.831
Built in Access EAP file
Deployment Diagram
Node1 (dependency) -> Node3A
Node2 (dependency) -> Node 3b
Node Merged exists, but has no relationships to or from that node.
If I select Node3A, then Node Merged (the latter being the target) graphically, and then right click, AddIns, Refactor, Merge, I get a dialog box indicating that one cannot merge an element onto itself.
If I select node3A as the target (has the extra hashed border around it), and do the merge, it succeeds, but of course there is no visible effect, as the source had no relationships.
If I do it with a relationship, I get a "save" dialog box, and the model fails an integrity check.
Similarly, if using the project browser I do
Merge from Node3A to Merged: OK (merged now has one reference)
Merge from Node3B to Merged: OK (merged now has to references)
Merge from Merged to Node3B: OK (merged has no more references, as they moved to Node3B)
Create a dependency from Node3A to Merged
Merge from Merged to Node 3B: I get a save dialog, and model fails the dependency check (these two events seem to correlate 100%)
Hope that helps, and thanks again for your efforts.
UPDATE: I printed off the code for MergeElements.cs and *may* see the issue there. The sequence in MergeFromDiagramContext() is something like:
...
try {
...
_target - (EA.Element)obj;
}
...
EA.Element A = _repository.GetElementByID(...);
EA.Element B = _repository.GetElementByID(...);
if(_target != null) {
if(_target ==A)
_source = B;
else
_source = A;
}
I think that the trouble is that the first setting of _target sets it to a reference to an object which is *neither* A nor B -- that is, the references are different. The object referred to by _target presumably has the same EA ElementID as one of A or B, but is not the same C# object (pointer) as either of them. (Disclaimer: I have never written C#: I am applying my extensive C/C++/Java background to this, and assuming C# works basically the same way).
So, instead, you would need this:
if(_target != null) {
if(_target.ElementID == A.ElementID) {
_source = B;
}
else
_source = A;
}
(PS: If no elements at all are selected, there is no error message, nor does it show the select dialog. I was unable to find a way to get the SelectTarget dialog to come up).
Hope that helps even more.

SECOND UPDATE: In looking at MergeConnectors() I think I see something that *may* be an issue that could cause the integrity check issue I reported (disclaimer: I have not explored the EA API reference in detail -- it may be that given how DeleteAt() works this code is perfectly good).
The code has a loop going thru all of the connectors on the source element, and as it finds one, it moves one end to the target, and then deletes it. While it is doing that, it is changing things out from underneath itself -- which you clearly recognized (see the DeleteAT() method call) and then decrementing the loop counter so as to reproces an entry. That feels dangerous to me. At the least, it seems likely that it will reprocess all of the new connectors (hopefully the code that checks for a matching ElementID would cause them to be ignored). Anyway, if there is a problem here (I'm not sure), I see two safer alternatives. One might be to build an array of all of the "old" connectors before changing any of them -- and then go back and delete the connectors later. The other would be to restart the loop from the beginning after each change.
The other thing I found myself wondering about was whether or not it was enough for the new connector to have just a ClientID and a SupplierID or if there was maybe some other critical property that needed to be set.
Hope that maybe helps some more.
