Improved parsing of error messages for auto-closing XML tags in XQuery mode.