Enable "Cyclic Generation" in the optical flow panel. It will sample frame 0 as the next sample, once it hits the final frame. Input art should loop as near as possible though, treat it as polish for a looper. I used it in this sample vid here:
I would always use it tbh, no one wants a blank motion vector for their last frame!
&Will fix that crash right now.