[FIX] XQuery: include context item declaration in locking check