some updates to dump_iteration_tree

also a few vartree related fixes from justin