--- Template.pm	2004-02-25 15:36:38.000000000 +1100
+++ ../Template.pm	2004-02-25 11:56:28.000000000 +1100
@@ -666,11 +666,6 @@
 memory_debug - if set to 1 the module will send information on cache
 memory usage to STDERR.  Requires the GTop module.  Defaults to 0.
 
-=item *
-
-includes_debug - if set to 1 the module will print TMPL_INCLUDE'd
-file-stack information, to STDERR.  Defaults to 0.
-
 =back
 
 =item Miscellaneous Options
@@ -933,7 +928,6 @@
                cache_debug => 0,
                shared_cache_debug => 0,
                memory_debug => 0,
-               includes_debug => 0,
                die_on_bad_params => 1,
                vanguard_compatibility_mode => 0,
                associate => [],
@@ -2211,10 +2205,6 @@
 	  (*fname, *fcounter, *fmax) = \ ( @{$fstack[$#fstack]} );
 	  
           # make sure we aren't infinitely recursing
-          if ($options->{includes_debug}) {
-            require 'Data/Dumper.pm';
-            print STDERR "TMPL_INCLUDE stack: ", Data::Dumper::Dumper(\@fstack);
-          }
           die "HTML::Template->new() : likely recursive includes - parsed $options->{max_includes} files deep and giving up (set max_includes higher to allow deeper recursion)." if ($options->{max_includes} and (scalar(@fstack) > $options->{max_includes}));
           
 	  # stick the remains of this chunk onto the bottom of the
@@ -2266,14 +2256,8 @@
     $fcounter += scalar(@{[$chunk =~ m/(\n)/g]});
     # if we just crossed the end of an included file
     # pop off the record and re-alias to the enclosing file's info
-#FIXME    pop(@fstack), (*fname, *fcounter, *fmax) = \ ( @{$fstack[$#fstack]} )
-#FIXME      if ($fcounter > $fmax);
-    while ($fcounter > $fmax) {
-      my $counter_offset = $fcounter - $fmax;
-      pop(@fstack), (*fname, *fcounter, *fmax) = \ ( @{$fstack[$#fstack]} );
-      $fcounter += $counter_offset;
-    }
-
+    pop(@fstack), (*fname, *fcounter, *fmax) = \ ( @{$fstack[$#fstack]} )
+      if ($fcounter > $fmax);
     
   } # next CHUNK
 
