https://imgur.com/a/iIeoL5A
The bug could obviously be fixed by looping back to 0, but the correctness is not the important part.
Though, reporting such an issue does not seem to be possible, hmm :(
Reply on news.ycombinator.com