diff --git flag.inc flag.inc
index 90210d5..3099179 100644
--- flag.inc
+++ flag.inc
@@ -987,6 +987,29 @@ class flag_flag {
   }
 
   /**
+   * Returns TRUE if this flag's declared API version is compatible with this
+   * module.
+   *
+   * An "incompatible" flag is one exported (and now being imported or exposed
+   * via hook_flag_default_flags()) by a different version of the Flag module.
+   * An incompatible flag should be treated as a "black box": it should not be
+   * saved or exported because our code may not know to handle its internal
+   * structure.
+   */
+  function is_compatible() {
+    if (isset($this->fid)) {
+      // Database flags are always compatible.
+      return TRUE;
+    }
+    else {
+      if (!isset($this->api_version)) {
+        $this->api_version = 1;
+      }
+      return $this->api_version == FLAG_API_VERSION;
+    }
+  }
+
+  /**
    * Disable a flag provided by a module.
    */
   function disable() {
diff --git flag.module flag.module
index c39943e..6bc5245 100644
--- flag.module
+++ flag.module
@@ -1501,9 +1501,8 @@ function flag_get_default_flags($include_disabled = FALSE) {
       $flag->module = $module;
 
       // Disable flags that are not at the current API version.
-      if (!isset($flag->api_version) || $flag->api_version < FLAG_API_VERSION) {
+      if (!$flag->is_compatible()) {
         $flag->status = FALSE;
-        $flag->api_version = isset($flag->api_version) ? $flag->api_version : 1;
       }
 
       // Add flags that have been enabled.
diff --git includes/flag.admin.inc includes/flag.admin.inc
index ac7906c..0b1b3db 100644
--- includes/flag.admin.inc
+++ includes/flag.admin.inc
@@ -53,7 +53,7 @@ function theme_flag_admin_page($flags, $default_flags) {
   foreach ($default_flags as $name => $flag) {
     if (!isset($flags[$name])) {
       $ops = array();
-      if ($flag->api_version < FLAG_API_VERSION) {
+      if (!$flag->is_compatible()) {
         $flag_updates_needed = TRUE;
         $ops['flags_update'] = array('title' => '<strong>' . t('update code') . '</strong>', 'href' => $flag->admin_path('update'), 'html' => TRUE);
       }
diff --git includes/flag.export.inc includes/flag.export.inc
index 452a773..d9047df 100644
--- includes/flag.export.inc
+++ includes/flag.export.inc
@@ -200,7 +200,7 @@ function flag_export_form_submit($form, &$form_state) {
  * Page for displaying an upgrade message and export form for Flag 1.x flags.
  */
 function flag_update_page($flag) {
-  if ($flag->api_version == FLAG_API_VERSION) {
+  if ($flag->is_compatible()) {
     drupal_set_message(t('The flag %name is already up-to-date with the latest Flag API and does not need upgrading.'));
     drupal_goto('admin/build/flags');
   }
