private void layoutProgram() {

		ProgramModule rootModule = root.getModule();
		root.visit();

		Group[] children = rootModule.getChildren();
		root.setGroupPath(new GroupPath(new String[] { rootModule.getName() }));

		// have to get first level of children, otherwise
		// root icon does not show up properly
		for (Group element : children) {
			insertGroup(root, element, root.getChildCount());
		}
		root.setTreePath(getPathForRow(0));
		buildNodeList();
	}
Get the first level of children for the root module.
Delay all other population of children of these nodes
until they are visited.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java