You can also use the Material node (Iterators) to output the list from the material manager. This doesn’t change but you can change where that output begins from. So if you had Red, Green Red Green, and you set the First Material node to a 0, as you iterate through a list of the material tags you would get the same pattern. But make the First material node equal to 1 you will get a pattern starting with Green.
This is “Learning to fly by first inventing air”, but with your method not working I thought it might help.
I stripped it down even further- two material nodes and two pairs of material tag nodes with a boole and a NOT to switch between which material gets sent to which pair of tags. Again, one change and then it’s frozen. This should work. But with two of the same tag in the expresso window, they might be fighting. That’s why I suggested a link list of both tags and materials – you can iterate through each and there won’t be any conflicts.