The simplest way to ensure full canonicalization is to canonicalize
recursively in most cases.
This fixes an assertion failure and presumably correctness bugs.
It does show up that D132797's index-based virtual method renames doesn't handle
templates well (the AST behavior is different and IMO better).
We could choose to disable in this case or change the index behavior,
but this patch doesn't do either.
Quick question to help better understand our current behavior. Not requesting to change anything here, just wanted to make sure what we're doing now.
If we run the rename inside the primary template itself, are we going to rename the use in Bar?
I suspect the answer is "yes" because it's in the same file, so we get it from the AST and not from the index. Just to make sure.