How did this capacitor survive having a nail driven through it?
Film capacitors can “self heal” from certain kinds of shorts by burning away a bit of film in the short. The film is so thin that bits of it can act as localized fuses. I imagine that’s what happens to all the places where the film electrode touches the nail.
For more, see https://ec.kemet.com/self-healing-capacitors-fix
As an addendum to Bob Jacobsens's answer, I am posting the 'chapter' that directly pertains to my question, based on his link, with any key words in bold. If the link goes away, we still have the detailed answer.
Film capacitors
Film capacitors have a thin polymer layer with metal electrodes formed either with a thin foil sheet or by spraying (well, vaporizing) the film with metalized metal. The film-foil style capacitors are not able to self-heal. While the metalized film type, which is far more common, tend to have good healing capabilities.
While I lump film capacitors into a single group, there are different dielectrics based on several film materials. For example, you might see polypropylene (PP), polyester (PET/PEN), metalized paper (MP), or polyphenylene sulfide (PPS). These dielectrics all have self-healing capabilities, the amount they self-heal does vary.
When a film capacitor self-heals, a spot in the dielectric allows an excessive amount of current to flow. This extreme leakage generates localized heating causing the film material to melt. As it melts, pieces of the electrode break up, breaking the path for current flow. The melted metal cools, leaving a non-conductive site. One way to consider the film healing process is like a small fuse blowing.
Film’s self-healing process is what makes film one of the most robust capacitor types. It is challenging for a film capacitor to fail short. As the capacitor fails, it turns itself into an open. This capability is one reason film capacitors are a popular choice as X/Y Safety Capacitors in an RFI or EMI filter.
quoted from https://ec.kemet.com/self-healing-capacitors-fix