[FIX] XQuery, #848: do not write back main-memory databases