I agree, only if other controllers are involved, then separate system macros setting the flags for each source selection would be necessary to maintain sync.
Otherwise, if managed correctly, only this (zone2) macro would switch these specific flags. No need to worry about losing sync. The last selected source, if needed again, could easily be extrapolated from the flags, unless lost to a power outage (does that reset flags?).
I was also trying to keep the macro as short as possible, again, for the specific function requested: three source sequencing.
Here's a similar macro for four sources: