[ADD] Test case for static variable referencing itself.
[FIX] XQuery, GH-885: self-referencing variables & updating expressions.
Merge pull request #887 from LeoWoerteler/gh-885

Fix for Static Variable Referencing Itself