Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.22.2.3
diff -u -r1.22.2.3 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	25 Feb 2009 12:53:24 -0000	1.22.2.3
+++ modules/taxonomy/taxonomy.admin.inc	16 Apr 2010 11:11:50 -0000
@@ -291,11 +291,19 @@
     $term_deltas = array();
     $tree = taxonomy_get_tree($vocabulary->vid);
     $term = current($tree);
+    $step_back = false;
     do {
       // In case this tree is completely empty.
       if (empty($term)) {
         break;
       }
+      
+      // Move back to first element if it is at the root
+      if ($step_back) {
+        $term = prev($tree);
+        $step_back = false;        
+      }
+      
       // Count entries before the current page.
       if ($page && ($page * $page_increment) > $before_entries && !isset($back_peddle)) {
         $before_entries++;
@@ -314,7 +322,10 @@
           $before_entries--;
           $back_peddle++;
           if ($pterm->depth == 0) {
-            prev($tree);
+            if (!prev($tree)) {
+              // Move to the first element at next root level loop
+              $step_back = reset($tree);
+            }
             continue 2; // Jump back to the start of the root level parent.
           }
         }

