Contrary to the popular belief, lithium batteries do NOT contain enough oxygen to just keep self-burning. Most of the lithium-ion pyrotechnics is just from good old atmospheric oxygen, which oxidizes the organic electrolyte.
What lithium-ion batteries have is the ignition source that basically keeps going on and on. So once you extinguish the burning electrolyte, it just keeps reigniting.