It's a tricky rule. Officially you are not allowed to overtake on the location of the event, but that doesn't go for the complete sector. Most important thing is that are careful around the location of the accidents and that you can prove that you've been careful there, by going wide around it or by stepping off the throttle for a bit. If you would accidently pass someone on the occasion we won't mind.
Don't be too hard on this, just be very careful.