Just past the first gym but that's pretty annoying to redo. I gave my partner four options of my starter for this run and she hasn't gotten back to me yet though so I'm not playing through yet.
So you'll have to do up to the 1st gym again? Hmm sorry about that. If you experience this now, you'll end up developing the insane but healthy habit of quick saving the game every two seconds, like I myself ended up doing XD