--- cxml-2007-08-05/xml/xml-parse.lisp.old	2007-09-22 20:02:07.000000000 +0400
+++ cxml-2007-08-05/xml/xml-parse.lisp	2007-09-22 20:02:26.000000000 +0400
@@ -2812,8 +2812,7 @@
       ((:ENTITY-REF)
        (let ((name sem))
          (consume-token input)
-         (append
-          (recurse-on-entity input name :general
+	 (let ((recursed (recurse-on-entity input name :general
                              (lambda (input)
                                (prog1
                                    (etypecase (checked-get-entdef name :general)
@@ -2821,8 +2820,10 @@
                                      (external-entdef (p/ext-parsed-ent input)))
                                  (unless (eq (peek-token input) :eof)
                                    (wf-error input "Trailing garbage. - ~S"
-					     (peek-token input))))))
-          (p/content input))))
+					     (peek-token input))))))))
+	   (if recursed
+	       (append recursed (p/content input))
+	       (p/content input)))))
       ((:<!\[)
        (let ((data (process-cdata-section input)))
 	 (sax:start-cdata (handler *ctx*))
