[FIX] XQuery, db:optimize(): preserve original options