That indefinite shelf life of BP is one of the hazards of handling old flintlocks, particularly if you hang them over the fireplace mantel. It has happened that flintlocks loaded over a hundred years before have cooked off.
Always a good idea, when dealing with old muzzleloaders, to measure the length of the free bore and then use that to check whether the bore is truly empty. It was common practice to leave them loaded. To measure, run the ramrod down the bore until it stops, then mark where the ramrod exits the muzzle. Next, remove the ramrod from the bore and lay the ramrod alongside the outside of the barrel with the mark you made even with the muzzle. See where the other end of the ramrod winds up. If it's all the way down to the breech, you're unloaded.
FWIW, a gunsmith friend up here in Maine was called in to get an old muzzleloader found in the attic of a 200 year-old house. The muzzle was plugged with a couple inches of goose grease. Behind the grease, the bore was perfect. It also was loaded.
"A man's rights rest in three boxes: the ballot box, the jury box, and the cartridge box."
Frederick Douglass, speech in Williamsport, November, 1867.