Make output_dot() cope with effects that are in multiple phases.