             ) ;;end while
           (if taginfo-from-iter
               (if (car cache-pos-cdr-iter)
+                  ;; Truncate the cache, removing all elements that point is
+                  ;; now outside of.
                   (setcdr cache-pos-cdr-iter 'nil)
                 ;; else: point is outside of everything in the cache
                 (setq jpw-phpBB-tag-analysis-cache '())
                 );;end if
             )
-          jpw-phpBB-tag-analysis-cache
           ) ;;end progn
       ;;
       ;; else:

{jpw: 09/2005}"
  (let* ((buffer-state (list (buffer-modified-p) (buffer-modified-tick)
                             (buffer-size)))
         (cache-pos-cdr-iter (cons 'nil jpw-phpBB-tag-analysis-cache))
         (taginfo-from-iter (cadr cache-pos-cdr-iter))
         (cached-startag-pos (car (cadr taginfo-from-iter)))
         (cached-endtag-pos (cadr (cadr taginfo-from-iter)))

         ) ;; end: Between two start tags.

        ;; [/TAG1] ..pt.. [/TAG2]
        ;; [/TAG2] ..pt.. [/TAG2]
        ((and (cadr info-last-tag) (cadr info-next-tag))
         ;; We're between end start tags.  Search backwards for the
         ;; matching start tag.
         ;; The latter case, where a tag is nested inside of itself, is
         ;; allowed, and must be handled by counting repeated occurrences of
         ;; "TAG2".
         (setq nested-tag-count
               (if (equal (caddr info-last-tag) next-tag) 2 1))
         (while (and info-last-tag
                     (> nested-tag-count 0))
           (setq info-last-tag 
                 (jpw-phpBB-tag-pos-to-syntactic
                  (jpw-phpBB-tag-find-last (car info-last-tag) from-pos)))
           (if (equal (caddr info-last-tag) next-tag)
               (if (cadr info-last-tag) ;; is end tag
                   (setq nested-tag-count (1+ nested-tag-count))
                 ;; else:  it's a matching start tag 
                 (setq nested-tag-count (1- nested-tag-count))
                 );;end if end-or-start tag
             );;end if equal
           );; end while

         ;; Loop stopped.  Do we have a result?
