There's a quote from Thomas J Watson, the founder of IBM. I'm not sure how accurate it is, and every time it's quoted the dollar amount seems different - but the principle makes sense:
“Recently, I was asked if I was going to fire an employee who made a mistake that cost the company $600,000. No, I replied, I just spent $600,000 training him. Why would I want somebody to hire his experience?”
— Thomas J Watson
It's a really tough issue, and mistakes happen. Was it a true accident, or was it caused by negligence, over-tiredness, or more preventable reasons? Does the employee care about the consequences of their actions (would they care if it happened again or will this change their behaviour).
It's really hard to say, but I know that by firing them and replacing them you aren't protecting yourself against this happening again! If you want to avoid this happening again, having somebody who knows that the consequences fully mean (like somebody who has made a mistake before) is probably a great person to have in that role because they understand the costs mistakes involve.
My take on it: mistakes are good work experience and education that come at a very high cost and usually at an inconvenient time, but people the whole experience might turn that person (or team) into a more valuable employee if it's something they grow from.