I’ve been reading and it might not be an actual bug, but something supported on certain version of GLSL and not supported on others.
My approach was to try things out and if they work, they are good. But I have discovered what @neilcsmith mentions above: “write once, test everywhere”. The fact that it works on my system doesn’t mean it will work on others, or that it is even correct. Maybe my driver is more tolerant, or includes features it shouldn’t.