Index: taxonomy_export.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_export/taxonomy_export.inc,v
retrieving revision 1.1.2.2
diff -b -u -p -r1.1.2.2 taxonomy_export.inc
--- taxonomy_export.inc	4 Feb 2010 20:59:13 -0000	1.1.2.2
+++ taxonomy_export.inc	10 Sep 2010 19:21:12 -0000
@@ -162,9 +162,12 @@ function _taxonomy_export_import(&$taxon
     // Parent map keeps track of existing TID hierarchy, allowing it to
     // be recreated.
     $parent_tid_map = array();
+    $processed_tids = array();
 
     // Pass #1, create all the terms
     foreach ($taxonomy_export->terms as $key => $term) {
+      if (!in_array($term->tid, $processed_tids)) {
+        $processed_tids[] = $term->tid;
       $term_ref =& $taxonomy_export->terms[$key];
       $parent_tid_map[$term->tid] = $key;
 
@@ -183,6 +186,7 @@ function _taxonomy_export_import(&$taxon
       // while taxonomy_save_term() requires a "parent" attribute ...
       $term_ref->parent = $taxonomy_export->terms[$key]->parents;
     }
+    }
 
     // Pass #2, rebuild the term hierarchy
     foreach ($taxonomy_export->terms as $key => $term) {
