I'm pretty sure you're wrong about your example being legally impossible.
And you might be right that the robocar companies aren't trying to program their cars to drive strictly legally for every possible situation, it is in fact a reasonable presumption.