Do you really need to iterate here to remove the tag? Why not just ignore it in the subsequent fold?