Who knows if the battery burst into flames? It could have have been whatever shorted the leads that burst into flames. Attach a wire across the leads and notice how quickly that wire gets HOT. (Actually, don't do this.) Either way, covering the leads with electrical tape is a good, simple, inexpensive precaution.
_________________________
If you're reading this, it's too late.