I try to compare two nodes where one node is additionally contained in another node.
Apart from this the two nodes and their sub-trees are equal and I expect to get no differences.
The reason seems to be the IEqualityHelper in the EditionDistance where the URI-distance is used.
Instead of calling DefaultMatchEngine.createDefaultEObjectMatcher(), create an IdentifierEObjectMatcher that delegates to an ProximityEObjectMatcher and give it an ID function that returns the same id (e.g. "root") for your two nodes and null for all other objects.
Thus configured, the IdentifierEObjectMatcher will add a match for your two nodes (without computing any edit distance, because they have the same id) and then delegate the matching of their children to the ProximityEObjectMatcher (because they have no ids).