Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1330
diff -u -p -r1.1330 node.module
--- modules/node/node.module	2 Dec 2010 23:58:21 -0000	1.1330
+++ modules/node/node.module	9 Dec 2010 21:13:02 -0000
@@ -734,6 +734,8 @@ function _node_types_build($rebuild = FA
     foreach ($_node_types->types as $type => $type_object) {
       if (!empty($type_object->is_new) || !empty($type_object->disabled_changed)) {
         node_type_save($type_object);
+        // Since the type has been saved, the is_new flag is no longer needed.
+        unset($_node_types->types[$type]->is_new);
       }
     }
   }
Index: modules/node/node.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.test,v
retrieving revision 1.104
diff -u -p -r1.104 node.test
--- modules/node/node.test	9 Dec 2010 08:01:56 -0000	1.104
+++ modules/node/node.test	9 Dec 2010 21:13:02 -0000
@@ -1169,9 +1169,24 @@ class NodeTypeTestCase extends DrupalWeb
   }
 
   /**
+   * Test that fresh node types are returned by node_type_get_types().
+   */
+  function testNodeTypeCaching() {
+    // Prime the node type cache.
+    node_types_rebuild();
+    // Enable the blog module, which provides a content type.
+    module_enable(array('blog'), FALSE);
+    $this->resetAll();
+    // node_type_get_types() should include the new type.
+    $new_types = node_type_get_types();
+    $this->assertTrue(isset($new_types['blog']), t('Retrieved node types include new type.'));
+    $this->assertTrue(empty($new_types['blog']->is_new), t('The is_new flag was unset after the type was saved.'));
+  }
+
+  /**
    * Test editing a node type using the UI.
    */
