one more fixup of error message reporting Daniel

* relaxng.c: one more fixup of error message reporting
Daniel
diff --git a/relaxng.c b/relaxng.c
index ea17cf1..6217904 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -8317,7 +8317,14 @@
 		tmp = xmlRelaxNGValidateDefinitionList(ctxt, define->content);
 		if (tmp != 0) {
 		    ret = -1;
-		    VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID, node->name);
+		    if (ctxt->state == NULL) {
+			ctxt->state = oldstate;
+			VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID, node->name);
+			ctxt->state = NULL;
+		    } else {
+			VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID, node->name);
+		    }
+
 		}
 	    }
 	    if (ctxt->states != NULL) {