Improve handling of errors when parsing GML files.