Fix endless loop in createTextBlock().