diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test
index 3e6301a..01bbb16 100644
--- a/core/modules/taxonomy/taxonomy.test
+++ b/core/modules/taxonomy/taxonomy.test
@@ -611,7 +611,11 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
     }
 
     // Get the created terms.
-    list($term1, $term2, $term3) = array_values(taxonomy_term_load_multiple(FALSE));
+    $term_objects = array();
+    foreach ($terms as $term) {
+      $term_objects[] = taxonomy_get_term_by_name($term);
+    }
+    list($term1, $term2, $term3) = $term_objects;
 
     // Delete term 1.
     $this->drupalPost('taxonomy/term/' . $term1->tid . '/edit', array(), t('Delete'));
