Index: deploy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/deploy/deploy.module,v
retrieving revision 1.2.2.11
diff -u -r1.2.2.11 deploy.module
--- deploy.module	11 Oct 2010 17:31:09 -0000	1.2.2.11
+++ deploy.module	1 Dec 2010 10:02:36 -0000
@@ -587,6 +587,20 @@
 }
 
 /**
+ * Remove an item from the specified deployment plan
+ *
+ * @param $pid
+ *   Unique identifier for the plan.
+ * @param $module
+ *   The module that is associated with this item.
+ * @param $data
+ *   Identifying data for this item (usually the item's original ID.)
+ */
+function deploy_remove_item_from_plan($pid, $module = 'node', $data){
+  db_query("DELETE FROM {deploy_plan_items} WHERE pid = %d AND module = '%s' AND data = %d", $pid, $module, $data);
+}
+
+/**
  * Get the current lowest weight in a specified plan.
  *
  * Used so that items can force themselves to be weighted "lighter" than
Index: modules/nodereference_deploy/nodereference_deploy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/deploy/modules/nodereference_deploy/Attic/nodereference_deploy.module,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 nodereference_deploy.module
--- modules/nodereference_deploy/nodereference_deploy.module	5 Mar 2010 15:31:07 -0000	1.1.2.2
+++ modules/nodereference_deploy/nodereference_deploy.module	1 Dec 2010 09:57:21 -0000
@@ -82,18 +82,20 @@
     // a) it was added by the user and will get checked down the line or
     // b) it was added through dependency checks and its already been
     // dealt with. So we just move on in this case.
-    if (!deploy_item_is_in_plan($pid, 'node', $nid)) {
-      // Does this node exist on the remote server?
-      $remote_key = deploy_get_remote_key(deploy_uuid_get_node_uuid($nid), 'node');
+    if (deploy_item_is_in_plan($pid, 'node', $nid)) {
+      //remove it
+      deploy_remove_item_from_plan($pid, 'node', $nid);
+    }
+    // Does this node exist on the remote server?
+    $remote_key = deploy_get_remote_key(deploy_uuid_get_node_uuid($nid), 'node');
 
-      // If it doesn't exist or the local version is newer, add it to the deployment plan, 
-      // with a weight of min(weight) - 1, and then run dependency checking on it
-      $plan_node = node_load($nid);
-      if ($plan_node && (!$remote_key || $remote_key['changed'] < $plan_node->changed)) {
+    // If it doesn't exist or the local version is newer, add it to the deployment plan,
+    // with a weight of min(weight) - 1, and then run dependency checking on it
+    $plan_node = node_load($nid);
+    if ($plan_node && (!$remote_key || $remote_key['changed'] < $plan_node->changed)) {
         deploy_add_to_plan($pid, 'node', $plan_node->type .': '. $plan_node->title, $plan_node->nid, deploy_get_min_weight($pid)-1, DEPLOY_NODE_GROUP_WEIGHT);
-        module_invoke_all('node_deploy_check', $plan_node);
-      }
     }
+    if($plan_node)  module_invoke_all('node_deploy_check', $plan_node);
   }
 }
 

