[FIX] XQuery: only bind context before compilation. Fixes #934