Tweak template name generation.