How to receive the to a selected entity corresponding ModelDoc2?

SolidWorks has a assembly document with subassemblies open. In my code i fetch the SelectionMgr instance from the ModelDoc2 instance of the top level assembly document. The user selects a Mate2 instance. i can fetch that with the code:

object selData = _selectionMgr.GetSelectedObject6(i, mark);
Feature feature = (Feature)selData;
Mate2 mate = feature.GetSpecificFeature2();

Now i need to get the correct owning document of that mate, which might not by the top level assembly but a subassembly. How? 
The path fetching the mate defining entities and fetching the owning ModelDoc2 of the entities wont work, because the mate defining entities can be own by a different sub doc the mate itself is owned by.