anchor.diff:    ((children :initform (%make-tree-output-record-tree)
                :accessor %tree-record-children)
      (children-hash :initform (make-hash-table :test #'eql) :reader %tree-record-children-cache)
  +   (child-count :initform 0)
      (last-insertion-nr :initform 0 :accessor last-insertion-nr)))
   
   (defun %entry-in-children-cache (record entry)
  
positive.code:   (let ((entry (make-tree-output-record-entry child (incf (last-insertion-nr record)))))
      (spatial-trees:insert entry (%tree-record-children record))
      (setf (output-record-parent child) record)
      (setf (%entry-in-children-cache record child) entry)))
  
  (defmethod delete-output-record (child (record standard-tree-output-record) &optional (errorp t))
    (let ((entry (find child (spatial-trees:search (%entry-in-children-cache record child)
                                                   (%tree-record-children record))
                       :key #'tree-output-record-entry-record)))
     (cond
       ((not (null entry))
        (spatial-trees:delete entry (%tree-record-children record))
        (%remove-entry-from-children-cache record child)
        (setf (output-record-parent child) nil))
       (errorp (error "~S is not a child of ~S" child record)))))
  
  (defmethod clear-output-record ((record standard-tree-output-record))
    (dolist (child (output-record-children record))
      (setf (output-record-parent child) nil)
      (%remove-entry-from-children-cache record child))
    (setf (%tree-record-children record) (%make-tree-output-record-tree)))
  
  (defun map-over-tree-output-records (function record rectangle sort-order function-args)
    (dolist (child (sort (spatial-trees:search rectangle
  
negative.code:       record
      (setf (rectangle-edges* record) (values x y x y))))
  
  (defmethod output-record-count ((record displayed-output-record))
    0)
  
  (defmethod map-over-output-records-1
  