[FIX] XQuery predicate evaluation. Closes #947