There can be consequences.
In the November 19, 1941 Hassan Tunnel fire accident between Los Angeles and Santa Barbara northbound Southern Pacific #4193 entered the tunnel on an uphill grade. The locomotive involved was an oil-fed steam engine and had a cab-forward design (AC-8) which meant, among other factors, that oil lines ran forward of the drive wheels, and leaked onto the rails.
Part-way through the tunnel, the locomotive lost traction. There was an attempt to back out of the tunnel, but a passenger applied brakes such that the train could not proceed backwards. A fire was ignited and the train ultimately burned with loss of 5 lives, 4 injured.
There's an extensive accident review I've found previously but cannot locate at the moment. The incident is listed here for November, 1941:
https://en.wikipedia.org/wiki/List_of_rail_accidents_(1930%E...
http://espee.railfan.net/trainwrecks.html
Contemporaneous news story:
http://www.gendisasters.com/california/15629/hassen-tunnel-c...