[MIN] XQuery, UserFuncs: function caching rewritings