Clean up error reporting in HTML template scanner