fixed managmeent of expandedNodes to expandedNodesMap allowing use of specified nodeId field in nodes to index map.