Changes to the heirarchy tree findMatchedPath which was mutating the path list

Recursive function was appending new heirarchy tree nodes onto path list
inappropriately.  Hopefully this prevents this. This uses a LinkedHashSet
instead of a Stack.  We may want to revert to a Stack to speed things up if
code does not break anything.