diff --git a/core/modules/taxonomy/taxonomy.admin.inc b/core/modules/taxonomy/taxonomy.admin.inc
index ecef0b5..d50cf18 100644
--- a/core/modules/taxonomy/taxonomy.admin.inc
+++ b/core/modules/taxonomy/taxonomy.admin.inc
@@ -158,10 +158,10 @@ function taxonomy_overview_terms($form, &$form_state, Vocabulary $vocabulary) {
   $delta = 0;
   $term_deltas = array();
   $tree = taxonomy_get_tree($vocabulary->vid, 0, NULL, TRUE);
-  $term = current($tree);
+  $tree_index = 0;
   do {
     // In case this tree is completely empty.
-    if (empty($term)) {
+    if (empty($tree[$tree_index])) {
       break;
     }
     $delta++;
@@ -177,13 +177,14 @@ function taxonomy_overview_terms($form, &$form_state, Vocabulary $vocabulary) {
     }
 
     // Do not let a term start the page that is not at the root.
+    $term = $tree[$tree_index];
     if (isset($term->depth) && ($term->depth > 0) && !isset($back_step)) {
       $back_step = 0;
-      while ($pterm = prev($tree)) {
+      while ($pterm = $tree[--$tree_index]) {
         $before_entries--;
         $back_step++;
         if ($pterm->depth == 0) {
-          prev($tree);
+          $tree_index--;
           continue 2; // Jump back to the start of the root level parent.
        }
       }
@@ -215,7 +216,7 @@ function taxonomy_overview_terms($form, &$form_state, Vocabulary $vocabulary) {
       $root_entries++;
     }
     $current_page[$key] = $term;
-  } while ($term = next($tree));
+  } while (isset($tree[++$tree_index]));
 
   // Because we didn't use a pager query, set the necessary pager variables.
   $total_entries = $before_entries + $page_entries + $after_entries;
