Add line number to Jinja errors, Fix #4966

Thanks to @Mrten to figuring this one out.  =)