Refactor step 5 of build_tree() into create_child_nodes().