Fix runahead when there is no final cycle and add test for that.
Style corrections.
Merge pull request #772 from arjclark/fix.runahead-no-final

Fix runahead when there is no final cycle and add test for that.