Maybe we can avoid generating a mangled name for a template if it is an eponymous one that evaluates to a manifest constant? This will save a ton of memory.
For templates that do not generate any symbols, we could treat the instantiations like a cache and limit the total number stored. The rest can then be GCed.