Self left join problems in Optiq

Here is a set of unit tests showing different issues from Optiq when self left joins are used.
The first unit test, testSelfLeftJoin1, returns a class cast exception.
The second unit test, testSelfLeftJoin2, returns a StackOverflowError.
The third unit test, testSelfLeftJoin3, returns an array IndexOutOfBoundException.