Fixes incorrect handling of one-block loops. Fixes infinite loop
generation.