diff -ruaN node_import.orig/supported/cck/content_taxonomy.inc node_import/supported/cck/content_taxonomy.inc
--- node_import.orig/supported/cck/content_taxonomy.inc	2010-12-10 12:04:26.000000000 +0200
+++ node_import/supported/cck/content_taxonomy.inc	2010-12-10 12:36:48.000000000 +0200
@@ -114,39 +114,19 @@
       $terms   = array();
       $results = array();
       foreach ($values[$fieldname] as $i => $value) {
-        $position = stripos($value['value'], '>>');
-        if ($position) {//using the delimiter, we are given the explicit parentage of the term. we can therefore have duplicate terms.
-          $lineage = explode('>>', $value['value']);
-          $terms = content_taxonomy_node_import_get_children($lineage, $vid);
-        }
-        else {//we have just one term, hopefully there are no duplicates, so let's find the parents
-          if (is_numeric($value['value'])) {
-            $foundterms = taxonomy_get_term(intval($value['value']));
-          }
-          else {
-            $value['value'] = content_taxonomy_node_import_check_numeric($value['value']);
-            $foundterms = taxonomy_get_term_by_name($value['value']);
-          }
-          foreach ($foundterms as $index => $termfound) {
-            if ($termfound->vid == $vid) {
-              $tid = $termfound->tid;
-              $terms[$tid] = (array)$termfound;
-              $children = taxonomy_get_children($tid, $vid);
-              $terms[$tid]['children'] = $children;
-              $parents = taxonomy_get_parents($tid);
-              $terms[$tid]['parents'] = $parents;
-            }
-          }
+        //using the delimiter, we are given the explicit parentage of the term. we can therefore have duplicate terms.
+        $lineage = explode('>>', $value['value']);
+
+        $add_terms = content_taxonomy_node_import_get_children($lineage, $vid);
+        if ($add_terms != NULL) {
+          $terms += $add_terms;
         }
       }
 
       //We now have our list of hierarchical terms in order of parent>>child>>child, etc. Now let's arrange them how
       //hierarchical select expects them to be.
       if (!empty($terms)) {
-        foreach ($terms as $index => $data) {
-          $results[] = $data['tid'];
-        }
-        $values[$fieldname]['tids'] = $results;
+        $values[$fieldname]['tids'] = array_keys($terms);
       }
       else {
         $values[$fieldname]['tids'] = NULL;
@@ -161,14 +141,11 @@
             $values[$fieldname][$i]['value'] = $tid;
           }
           else {
-            $value['value'] = content_taxonomy_node_import_check_numeric($value['value']);
-            if (trim($value['value']) != '') {
-              $edit = array('vid' => $vid, 'name' => $value['value']);
-              taxonomy_save_term($edit);
-              $sql = "SELECT tid FROM {term_data} WHERE vid = %d AND tid = %d";
-              if ($tid = db_result(db_query($sql, $vid, intval($value['value'])))) {
-                $values[$fieldname][$i]['value'] = $tid;
-              }
+            $edit = array('vid' => $vid, 'name' => $value['value']);
+            taxonomy_save_term($edit);
+            $sql = "SELECT tid FROM {term_data} WHERE vid = %d AND tid = %d";
+            if ($tid = db_result(db_query($sql, $vid, intval($value['value'])))) {
+              $values[$fieldname][$i]['value'] = $tid;
             }
           }
         }
@@ -202,9 +179,11 @@
  * @param <type> $parent_tid
  * @return <type>
  */
-function content_taxonomy_node_import_get_children($lineage, $vid, $parent_tid = NULL) {
+function content_taxonomy_node_import_get_children($lineage, $vid, $ptid = NULL) {
+  $terms = array();
+  $tid = 0;
   $top = array_shift($lineage);
-  $remainder = $lineage;
+
   if (is_numeric($top)) {
     $foundterms = taxonomy_get_term(intval($top));
   }
@@ -212,47 +191,61 @@
     $top = content_taxonomy_node_import_check_numeric($top);
     $foundterms = taxonomy_get_term_by_name($top);
   }
-  //first, let's clear out any terms in other vocabularies
+
   foreach ($foundterms as $index => $termfound) {
+    //first, let's clear out any terms in other vocabularies
     if ($termfound->vid != $vid) {
       unset($foundterms[$index]);
     }
+    else {
+      //skip terms whose text matched, but isn't in the right spot of the hierarchy
+      $tid = $termfound->tid;
+      $parents = taxonomy_get_parents($tid);
+      if (($ptid != NULL && !isset($parents[$ptid])) || ($ptid == NULL && !empty($parents))) {
+        unset($foundterms[$index]);
+      }
+    }
   }
+  if($termfound) unset($termfound);
+
   if (empty($foundterms)) {
-    node_import_input_error(t("The term %value was not found at the expected level in your taxonomy hierarchy. Please check your import file and try again.", array('%value' => $top)));
-    return NULL;
-  }
-  //let's take what we have left and make sure we found the right child - there should just be one term left after the parent sifting that follows
-  $current_tid = 0;
-  foreach ($foundterms as $index => $termfound) {
-    $tid = $termfound->tid;
-    $parents = taxonomy_get_parents($tid);
-    if (($parent_tid != NULL && !isset($parents[$parent_tid])) || ($parent_tid == NULL && !empty($parents))) {
-      unset($foundterms[$index]);//we found a term whose text matched, but isn't in the right spot of the hierarchy
-      continue;
+    $term = array('vid' => $vid, 'name' => $top);
+    $parents = array();
+    if($ptid) {
+      $term['parent'] = $ptid;
+      $parents[$ptid] = taxonomy_get_term($ptid);
     }
-    else {
-      $current_tid = $tid;
+
+    taxonomy_save_term($term);
+
+    $tid = $term['tid'];
+
+    $terms[$tid] = $term;
+    $terms[$tid]['parents'] = $parents;
+    $terms[$tid]['children'] = array();
+  }
+  else {
+    if (count($foundterms) > 1) {
+      node_import_input_error(t("The term %value was found MORE THAN ONCE as children of the same term. Please check your import file and try again.", array('%value' => $top)));
+      return NULL;
     }
+
+    //there should just be one term left after the parent sifting that follows
+    $termfound = $foundterms[0];
+    $tid = $termfound->tid;
+
     //drupal_set_message('<pre>Parents: ' . print_r($parents, TRUE) . '</pre>');
     $terms[$tid] = (array)$termfound;
     $children = taxonomy_get_children($tid, $vid);
-    $terms[$tid]['children'] = $children;    
+    $terms[$tid]['children'] = $children;
     $terms[$tid]['parents'] = $parents;
   }
-  if (empty($terms)) {
-    node_import_input_error(t("The term %value was not found at the expected level in your taxonomy hierarchy, but a match was found at a different level. Please check your import file and try again.", array('%value' => $top)));
-    return NULL;
-  }
-  if (count($terms) > 1) {
-    node_import_input_error(t("The term %value was found MORE THAN ONCE as children of the same term. Please check your import file and try again.", array('%value' => $top)));
-    return NULL;
-  }
-  if (is_array($remainder) && !empty($remainder)) {
+
+  if (is_array($lineage) && !empty($lineage)) {
     //drupal_set_message('<pre>Terms inside: ' . print_r($terms, TRUE) . '</pre>');
-    $child_terms = content_taxonomy_node_import_get_children($remainder, $vid, $current_tid);
+    $child_terms = content_taxonomy_node_import_get_children($lineage, $vid, $tid);
     if ($child_terms != NULL) {
-      $terms = array_merge($terms, $child_terms);
+      $terms += $child_terms;
     }
   }
   return $terms;
