[FIX] XQuery, order of descendant and child steps. Closes #1001