Under what situation would that happen? It happens with human drivers because they are driving too fast to stop in time. It's very simple... if you need 50 feet to stop you make sure at minimum you have 50 feet to stop. If there are things obscuring your view to the left and right you drive slower to reduce your stopping distance and make sure if something jumps out you still have enough time.
Now, if you are to consider that something jumps out in front of your car (say a deer) which reduces your reaction time, the car should do the same thing a human would do. Slam on the breaks to reduce impact speed.
A tyre blows. A rock hits the sensor on top of the car. An electrical contact gets disconnected due to vibration. Water gets into computer. Those things happen thousands of times, daily, to cars around the world. Automatic cars will have to deal with all of them, in one way or the other. Like you said - the most "failsafe" solution the computer can do is slam the brakes. Which will be good enough in most cases. But I will repeat my question again - what if slamming the brakes causes more injuries than doing something else, and computer "knows" it(as in - it has calculated that it would cause more damage)? Should it still do it?
Edit: The difference between a human slamming on brakes and a computer doing the same is that humans are not perfectly rational. If I see a deer in front of me, I'm probably going to break as hard as I can. But will I take into account that the road is slippery and braking will cause the car to spin and land in front of a lorry, and maybe the correct decision is to not brake and hit the deer? Of course I won't - humans are not quick enough to decide on that. The problem here is, that computers are fast enough - and now we have to decide whatever they should behave in a "dumb" way, like a human would - or whatever they should be making those decisions no human could make, even if they verge on being unethical?
Now, if you are to consider that something jumps out in front of your car (say a deer) which reduces your reaction time, the car should do the same thing a human would do. Slam on the breaks to reduce impact speed.