clancommon.SwapJoinSides: fixes

The emitters were wrong. Also, make the emitters copy the current
variable names.