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