As for looking forward and ways to prevent a similar situation even having a chance to occur...
As far as I'm concerned, and I think I even raised it in this thread before, cars pitting under the safety car should face a 5 or 10 second wait before work can be done on thier car, much the same way they do when they have a time penalty.
This negates most of the advantage of pitting under the safety car. I mean it's pretty ironic that a "safety" car coming on to track usually leads to a huge fluster of knee jerk reactions and half the field storming into the pit lane at the same time.