Tweaks to #346 XHTML bugs