The simplest and least intrusive way to fix this.

This is the simplest way that works. It won't change the existing .Equals() or == semantics, so it should be safe. It also actually compares the names of the TemplatedDecl, but the Template.Name property is overloaded to return that.

And it fixes the crash with QtGui.