[cleanup] Tweak existing code around `new TemplateInstance`
fix Issue 12037 - Link-failure with std.numeric.CustomFloat
Merge pull request #3177 from 9rnsr/fix12037

[REG2.065a] Issue 12037 - Link-failure with std.numeric.CustomFloat