I can guess why the WD-40, a petroleum product, is not a good idea.
Consider the amount of flash produced by the cap before the chamber ignites.
I would guess that the cap flash ignited the WD-40, which in turn ignited the caps on the remaining cylinders.
Spraying the pistol probable got WD-40...