[FIX] XQuery: Parallel queries return wrong results. Closes #841.
[MIN] Cleanup