Fix name clash when looping over more than two waveforms