[FIX] XQuery, no error in castable expression. Closes #963