Food for thought:
Black powder has an auto ignition temperature of around 870°F. or slightly less. When subjected to that temperature it will ignite.
A diesel engine compression ratio is usually between 15:1 and 23:1
Compressing ambient air to a 20:1 compression ratio creates a pressure of about 294 psi
Rapidly compressing the air to a 20:1 compression ratio will heat the air to around 1300°F
Notice, this 1300°F temperature only took a pressure increase of 294 psi.
The pressure in the breech of a muzzle loader can easily be over 2000 psi.
Now, I realize that in the case of a firearm, it really isn't compressing the gas from a room pressure of 14.7 psi. Rather, it is creating the gas from a solid but I have to believe the temperature of the gas is at least 1300°F or, more likely well over that temperature and this high pressure gas would have no difficulty in moving between the granules of powder and subjecting them to both the high pressure but the high temperature as well.
If this is true, the temperature around each particle will be well above the auto ignition temperature of black powder so, it will start to burn all by itself.
That would rule out the idea that there is unburned black powder in the barrel, even at the front of the powder charge well away from the powder that is actually burning at the rear.
(All of the data numbers are easily found on the web if you are wondering where I found them and yes, I used multiple sources to rule out incorrect values.)
Like I say, something to think about.