[FIX] XQuery: correctly exit scope when binding function arguments
[MOD] XQuery, function calls: improved error feedback