Fixed #799: XInclude failure leads to corrupt exception error message