Fix an accidental infinite loop.