Improve TeradataTemplates #561