Terpenes are highly flammable. If you burn a piece of rosin with a lighter it'll go up in a flame quick, just like BHO does. People think lighting BHO on fire is a good indicator of how clean their hash is but that's completely false. Terpenes are solvents too and even though they're naturally occuring in the plant they're still just as flammable. They're strong enough that people use them for extracting too - LHO uses limonene as a solvent which is naturally found in oranges and what makes tangie/cali-o/ all the other "orange" cultivars have that unique flavor and smell.
If it wasn't shooting fireworks off the nail I doubt it's any residual solvent, especially if it's some bomb oil like you're saying. Maybe the nail was just a little too hot or something and you were pulling air over it really giving it the chance to ignite. Hard to say though
Edit: Just saw how you said this happened twice - that's pretty crazy then if you got a good feel for your nail. I really have no idea tbh that's kinda crazy