Fixed a really nasty problem raised by a DocBook XSLT transform provided

* entities.c parser.c tree.c include/libxml/entities.h: Fixed
  a really nasty problem raised by a DocBook XSLT transform
  provided by Sebastian Bergmann
Daniel
diff --git a/parser.c b/parser.c
index 578a73c..79b46c0 100644
--- a/parser.c
+++ b/parser.c
@@ -5474,6 +5474,7 @@
 			    (ent->children == NULL)) {
 			    ent->children = list;
 			    ent->last = list;
+			    ent->owner = 1;
 			    list->parent = (xmlNodePtr) ent;
 			} else {
 			    xmlFreeNodeList(list);
@@ -5539,7 +5540,9 @@
 				    (list->next == NULL)) {
 				    list->parent = (xmlNodePtr) ent;
 				    list = NULL;
+				    ent->owner = 1;
 				} else {
+				    ent->owner = 0;
 				    while (list != NULL) {
 					list->parent = (xmlNodePtr) ctxt->node;
 					list->doc = ctxt->myDoc;
@@ -5552,6 +5555,7 @@
 				      xmlAddEntityReference(ent, list, NULL);
 				}
 			    } else {
+				ent->owner = 1;
 				while (list != NULL) {
 				    list->parent = (xmlNodePtr) ent;
 				    if (list->next == NULL)