Image sequence wont loop animation once a driver was added

I have a pre-animated character mapped to a plane. I want to be able to slow down or scale up the frames per second specifically on the character mapped to the plane while keeping the blend files’ fps at 24. Also, I want to be able to make the animation loop. So I followed this guide:

And I was able to make the offset skip or stay on frames longer, but now my issue is that the animation won’t loop back to its normal frame. The offset just keeps calculating based on the expression instead of going back to its first frame. I tried to tick the Cyclic and Auto-refresh boxes but they had no effect.

And to make the guide work I had to go into user preferences and tick Auto Run Python scripts.(So you can replicate it)

Let me know if any more info is needed.

issue.blend (506.5 KB)