glsl2: Track the number of ir_loop_jump instructions that are in a loop
diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp
index 9eb1a89..f2e1ecb 100644
--- a/src/glsl/loop_controls.cpp
+++ b/src/glsl/loop_controls.cpp
@@ -253,6 +253,10 @@
 		   * satisfied.
 		   */
 		  if_stmt->remove();
+
+		  assert(ls->num_loop_jumps > 0);
+		  ls->num_loop_jumps--;
+
 		  this->progress = true;
 	       }