Extra frames being added to animation

I’m using the new 2D version of Unity, and my animation was working fine. I was using basic frame-to-frame sprite animation for a walk cycle, with a child GameObject attached to the head which “bobbed” up and down.

I changed the pivot on my sprite, which meant I had to change the position of the child GameObject. However, when I did, Unity seems to have added an extra frame onto the end of my walk cycle – there are no keyframes there, but Unity has decided to stay on the last keyframe for one frame longer than it should.

I don’t understand why it would do that. It was working completely fine – the only thing I changed as the position of an object, and I didn’t add any extra frames or anything. There are a couple solutions out there, but they all date back to 2012 and don’t work with newer versions of Unity. Any help?

Please show some codes