For that, there's brakes. It has the disadvantage that it allows the lane-merger to "win", but at anything above parking-lot speeds it clears the hazard without creating any new ones (assuming that the guy behind you maintains a safe following distance -- but then the hazard was not newly created, it was already there), and it is always an option, whereas changing to the other lane might not be an available choice. For a robotically controlled car, that would certainly be the algorithm, because it ensures that the robot will not be at fault if a crash occurs following the avoiding maneuver. Impatient+savvy human drivers might learn to aggressively cut off robot-cars, but this would also be true even if the reaction was a swerve, even an optional swerve.
Braking has the secondary advantage of reducing speed in any crash that might subsequently result, which generally reduces the severity and scope of the crash.