I see. Perhaps this?
You could then use a higher heading to specify the one you actually want, like in
[[#heading c#heading a]]
to get to the last appearance of “heading a”. You can’t use auto complete to find that though… And it does require for a somewhat proper heading structure in your document.With 2 headings of same name in file can only link to first one - #3 by holroy