Part of the confusion what you mean by icon set. Presumably, these are shapes or images or icons that look like flags? Not clear which.
Second, is the shape data applied to other shapes, which depending on the flag state, cause the flag to appear, or, does the shapedata get applied directly to the flags.
My interpretation is that you have a set of shapes, which look like flags with various colors. Then depending upon the state of some data variable, the desired flag will show with the appropriate color. If there is no valid data, then the flags are not visible. More or less correct?
This could be done with a single flag shape, and the shapedata can be used to control visibility and color. Doesn't need to be a set of 3 separate shapes.
Wapperdude