bool flatten: node num_children workaround