you have multiple connections "fanning out" from one outlet. this means the execution order is undefined (read Pd's html manual for more detailed explanation). solution for this subproblem is [trigger] aka [t] - check the help patch.
Pd's depth-first chain of processing coupled with Gem's "not particularly dataflow" way of working (it modifies OpenGL's internal state directly at each object instead of passing the actual state along the patch cords) it leads to weirdness.
However, there is a solution: use both [trigger] for ordering, and [separator] to save/restore the OpenGL state (see also [pix_separator]).
something like:
[gemhead]
|
[trigger a a]
| \
[separator] [separator]
| |
|
or even maybe just use separate [gemhead] objects, if you have a simple scene?