Fix references to methods on templated classes.
The comparison of the definition qualname against the reference qualname
was failing for these because the definition would have no template
parameters (e.g. vector::size()) and the reference would (e.g.
vector<int>::size()).  These checks were only added to deal with a
rare case where macro expansion lead to two different references having
the same location and no extents.