a couple of errors were reported but not saved back as such in the parsing

* parser.c valid.c: a couple of errors were reported but not
  saved back as such in the parsing context. Down to 1% failure rate
  Ran 1819 tests: 1801 suceeded, 18 failed and 0 generated an error
Daniel
diff --git a/parser.c b/parser.c
index 83a850a..9162d90 100644
--- a/parser.c
+++ b/parser.c
@@ -5515,12 +5515,14 @@
 			    ctxt->sax->error(ctxt->userData, 
 				 "Entity '%s' not defined\n", name);
 			ctxt->wellFormed = 0;
+			ctxt->valid = 0;
 			ctxt->disableSAX = 1;
 		    } else {
 			ctxt->errNo = XML_WAR_UNDECLARED_ENTITY;
 			if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
 			    ctxt->sax->error(ctxt->userData, 
 				 "Entity '%s' not defined\n", name);
+			ctxt->valid = 0;
 		    }
 		}