Patch Set 1: I would prefer that you didn't submit this; IP review completed

Why do you need this logic about the innermost project? For the first time you hit an open project with the Iterator (in this case you have just one project as container in the array) you return a ContainerTreeIterator. The method createSubtreeIterator is overwritten on ContainerTreeIterator, therefore you will never get into the situation that you have more than one projects as container.

I wonder if we should take into accont only shared projects, but I'm not sure whether that makes a difference.

What about adding a test case?