Fix infinite loop of death.
Merge pull request #1245 from sbt/fix/infinite-loop

Fix infinite loop of death.