Template instantiation can set the canonical decl to used after subsequent decls have been chained, so we have to check that too. llvm-svn: 171088
This fixes pr14691, which I think is a regression from r168519. llvm-svn: 171077