Please make sure that all currently selected child items of a parent node (and grandchild and grandgrandchild... items) are unselected once that parent node is closed.
The #selected items shown in any view, in particular the tree view, must always correspond to the number of visible, selected items (including those below the fold). But currently, if you close a single node in the tree, the items inside it remain selected. That's against this principle. When a node is closed, *all its currently selected child items should in fact get deselected.
If you have doubts that this should work like this, the following case might convince you. You have two items selected inside a parent node, then that node is closed. If those items remain selected, how are you going to know, where these items actually are? You would have to re-open every node and go looking for them.
That's why any operation affecting the selection of items (such as checking single items or selecting all items at once) only works on the set of currently visible items. Check that with tree implemenations you know (e.g. the Finder or Eclipse).