Hopefully, the first time it happens, you pay quick attention and decide how to prevent it moving forward. But if you do, then it won't happen again, so if it's happened again, you either weren't paying attention and taking appropriate action, or something else happened to allow the thing to happen (again).
Just realize that you can't get away with calling things mistakes for long. After the first time, it's all on you.
With regard to the client, you owe it to her/him to figure out what's happening, and tell the truth about what's going on. Contrary to popular belief, the client is likely to think more highly of you for doing that, than if you keep apologizing when it keeps happening.