In an accident, it should continue to do this to the best of its ability. Let's say something weird like a ball joint fails while driving at speed on the freeway. Now, for those of you that don't know, in a regular car this is a bad situation - essentially, your wheel is about to fall off and you have limited to no steering control.
But if the car hit the brakes, turned the wheel (however ineffective that may be), and/or did other inputs to try to avoid a pedestrian on the sidewalk, or another car, or whatever - in an attempt to come to as safe a stop as possible...
...but it still injured or killed somebody - then I'd say it did the best it could, same as a good-to-great driver would. Assuming it logged everything about everything; what went wrong, when it sensed it, what it did in response, what it saw or sensed, etc - then I'd say it should be exonerated, or at worst "charged" with involuntary manslaughter or something of that nature.
If it was programmed (whatever that means, ultimately - I'm just an amateur self-driving vehicle enthusiast; I've taken a few MOOC courses on self-driving vehicle technology, including the Udacity nanodegree for Self-driving Car Engineers - so I know some things about how this stuff really works from a code and mechanical and sensor perspective, but I am no expert) to do the best it could to avoid the situation, but it still failed - and it could be shown it tried - then can we hold the vehicle, the owner, or the manufacturer responsible?
I suppose if maybe the driver (owner?) knew they had a failing ball joint (or whatever) that led to the accident (how they would know this? especially on a fairly new vehicle) - maybe fault or blame could be laid there. Or if road conditions caused the problem (chuckhole causing a blowout at speed?) - maybe the city/state?