I don't know what's causing this, but it looks like somehow the validator can generate bad HTML?  See doc ID 212 in scriptorium production for this example.