BaseXdb/basex — pull request #1025 by LeoWoerteler (2014-11-10 13:57:10+00:00)
Title: [FIX] XQuery, GH-1023: Do not optimize at run-time.

Please review before merging. Open questions:

* Is this too much logic for run-time code?
* Should `function() as item()+ { () }` be a *create-time* or a *call-time* error (if it is not caught statically)?