Remove closing tag duplicates.