Small tweak to XML validation code