[FIX] XQuery Update, locking downgrades. Fixes #727