I suspect there's some oddity around handling the tail text of the <img> tag. In code, the 'BOMB SCARE' immediately following the tag is actually the element's .tail attribute. I think something is happening that the <img> tag is being copied as if it were text; perhaps there's an oddity in handling tags that have no .text attribute but do have a .tail attribute.
Hopefully that's enough for someone enterprising enough to go fixing this. And hopefully I'm at least close to right