Fixed getImmediateNodes() to return only immediate nodes rather than all nodes of their sub-tree. This fixes containerless if and foreach. #5.