[FIX] XQuery, 1.0 compatibility. Closes #694