correct error report for xtemplate. Fixes #659