Bugzilla 432761.
Fixes tagForPath to handle multiple tags with the same leaf name in different hierarchies.