While investigating #25, I found that some bounds check is inclusive in the paper, and exclusive in implementation. I fixed this, and test from #25 has never failed again.
Fixes #25