Fix infinite loop

I hit this infinite loop when I was trying to debug GLX2.