Fixed #917: Infinite loop is infinite