pub fn collect_nodes(plan: &Plan) -> Vec<&Plan>
Recursively collect every node in a plan tree (depth-first, parent-first).