Figure 20. Infinite loop checking