Refactor step 7 of build_tree() into activate_nodes_for_next_level().