--- includes/content.crud.inc	2009-05-03 14:00:48.000000000 +0200
+++ includes/content.crud.inc	2009-05-03 14:19:44.000000000 +0200
@@ -517,6 +517,22 @@ function content_field_instance_delete($
 
     content_alter_schema($instance, $new_instance);
   }
+  // If more than one instance remains, we may need to remove from the shared
+  // per field table all records related to the content type where the field
+  // is being removed.
+  elseif (sizeof($instances) > 1 && $field['db_storage'] == CONTENT_DB_STORAGE_PER_FIELD) {
+    $db_info = content_database_info($field);
+    $table = $db_info['table'];
+    $nids = array();
+    $result = db_query("SELECT f.nid FROM {". $table ."} f INNER JOIN {node} n ON n.nid = f.nid WHERE n.type = '%s'", $field['type_name']);
+    while ($row = db_fetch_object($result)) {
+      $nids[] = $row->nid;
+    }
+    if (!empty($nids)) {
+      $placeholders = implode(', ', array_fill(0, count($nids), '%d'));
+      db_query("DELETE FROM {". $table ."} WHERE nid IN (". $placeholders .")", $nids);
+    }
+  }
 
   content_clear_type_cache(TRUE);
 
