The trolley problem is not relevant because an autonomous vehicle should never put itself in a position where it might drive into anything.
This may mean that the car drives rather slowly when the treeline is close to the road, or extremely slowly when the road is slick or foggy. But it can be done.