[ADD] XQuery, #804: faster evaluation of db:replace
[MIN] cleanups