print_tree: only print the "nops=" line when nops() > 0