Fixed crash due to GLSL compiler optimisation