You just have to thank your lucky stars. It's stuff like this that makes me think about not riding, but then I snap back to reality. During the course of my driving to work there are numerous instances when things could have gone horribly wrong, but they did, partly because of my own skills as a driver and partly because of luck. I like to think that it's more of the former. To take it further, really, life is fraught with dangers; it doesn't mean we stop living.
I think you just have keep being vigilant.