fixed in SVN. two basic test cases added which succeed. More comprehensive unit testing needed later.
Problem with variable scoping in filters used in subqueries. For now, I have implemented a workaround in FilterIterator (see revision 10803): it now simply does not limit the in-scope bindings when the filter is part of a Subquery. This is not a robust solution, however, we need to fix the way the in-scope bindingnames are determined.