Fix bug where isAt() method may run longer than necessary before
detecting a miss.

Fixes #16 reported by zhenchuan.