BUG: the error was not correctly propagated to the caller.
ENHANCEMENT: upgrade to saxon '9.5.1-4'.