Fixed some bugs with new checking algorithm.

Still has some issues that I can't quite isolate. But it's a lot better than
it used to be.
Edited comment to reflect prior changes.