[ADD] XQuery, GH-879: Rob Stapper's test case.
[MOD] Relaxed requirements for inlining function items.
[MOD] Moved non-local bindings from `VarScope` to `Closure`.
Merge pull request #880 from LeoWoerteler/gh-879

Relaxed requirements for inlining function items.