glsl: Don't increase the iteration count when there are no terminators