Lazy ident

This cuts generation of TemplateInstance::ident's down about 75% by doing it lazily.

Not a big improvement, but perceptible.