I see where you're going with this and I agree.
A significant consideration is whether owners of self driving cars will have the right to make code modifications to their vehicles.
Captured aptly here by Cory Doctrow.
https://www.theguardian.com/technology/2015/dec/23/the-probl...
Edit: salient quotes from the article:
"Here’s a different way of thinking about [the trolley] problem: if you wanted to design a car that intentionally murdered its driver under certain circumstances, how would you make sure that the driver never altered its programming so that they could be assured that their property would never intentionally murder them?"
"If self-driving cars can only be safe if we are sure no one can reconfigure them without manufacturer approval, then they will never be safe."
"Your relationship to the car you ride in, but do not own, makes all the problems mentioned even harder."