[ADD] XQuery, GH-1038: Test case.
[FIX] XQuery, GH-1038: Compile functions that are mutually recursive through a function literal.
[ADD] Internal error if `Closure`s are not compiled.
Merge pull request #1039 from LeoWoerteler/gh-1038

Fix for GH-1038