Make HTML5 verlays more resilient to XML weirdness