Apply jinja renderer error line fix to TemplateSyntaxError

This applies the same fix made for jinja2.exceptions.UndefinedError to
jinja2.exceptions.TemplateSyntaxError, so that it reports the correct
line.