Fix issue matching XML documents with attributes.