Fix another infinite loop bug in the layouter #closes 1