The fire on the locomotives before the wagons detached is likely to be of major importance as to how the wagons were a) able to detach in the first place and b) ran away.
Even so, I'm surprised that modern safety systems don't automatically apply the brakes of the wagons when the connection to the locomotives is lost. It's not an American continent thing either, we had a runaway on the London Underground a few years ago that chased a passenger train, fortunately there was no impact, but the fact that it happened indicated some sort of braking system on the wagons is either not in place or is inadequate to cope with the gradients on the routes it travels. (
http://www.bbc.co.uk/news/uk-england-10964766)