If you can calculate two frames ahead, I'd try: if f0==f2, f1=f0. I.e. don't allow single frame changes.
But that's a little complicated by the scrolling, and you might have to ignore the filter on the edge that's coming into view.
I'm trying not to nerd-snipe myself on this 😀