Bugfix and tests for filename of template errors during compilation.  Fixes #923