Well, better I discovered the dead batteries when I wasn't actually trying to use the camera!

I don't think the frame counter knows whether the back is open or closed. I think what happened was that you must have pressed the button without realizing it before loading the camera, so the counter started advancing when you were just lining up the start arrows, and that must have caused the overlapping frames.