diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 93f0ddc..d1811fa 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -718,11 +718,9 @@ function _node_types_build($rebuild = FALSE) {
     $type_db = $type_object->type;
     // Original disabled value.
     $disabled = $type_object->disabled;
-    // Check for node types from disabled modules and mark their types for removal.
-    // Types defined by the node module in the database (rather than by a separate
-    // module using hook_node_info) have a base value of 'node_content'. The isset()
-    // check prevents errors on old (pre-Drupal 7) databases.
-    if (isset($type_object->base) && $type_object->base != 'node_content' && empty($_node_types->types[$type_db])) {
+    // Check for node types either from disabled modules or otherwise not defined
+    // and mark as disabled.
+    if (empty($type_object->custom) && empty($_node_types->types[$type_db])) {
       $type_object->disabled = TRUE;
     }
     if (isset($_node_types->types[$type_db])) {
