misc: flattenTree -> flatten_tree