Fixed parsing of error condition in the presence of text node.