Improve XPath deserializer error handling.