Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 13319)
+++ wp-includes/taxonomy.php	(working copy)
@@ -1589,12 +1589,13 @@
 	if ( !is_array($terms) )
 		$terms = array($terms);
 
+	$old_tt_ids = array();
+	$tt_ids = array();
+	$term_ids = array();
+
 	if ( ! $append )
 		$old_tt_ids =  wp_get_object_terms($object_id, $taxonomy, array('fields' => 'tt_ids', 'orderby' => 'none'));
 
-	$tt_ids = array();
-	$term_ids = array();
-
 	foreach ( (array) $terms as $term) {
 		if ( !strlen(trim($term)) )
 			continue;
