Something I wonder is if vehicle control algorithms are or will include defensive driving.
I would say this situation applies. It was changing lanes because there was a gap, but then the gap was closing, so it abandoned the lane change. I've heard of Audi's L3 (L4?) cars doing that in Germany on the Autobahn. It was moving into the left lane to pass, but as it got over, it detected oncoming traffic behind it at high speed and abandoned the lane change and moved back.