Minor improvements to syntax error reporting.