       @manifest.on 'add',   (model, collection) -> ALL_CONTENT.add model
       @manifest.on 'reset', (model, collection) -> ALL_CONTENT.add model
 
+      # If a model's id changes then update the `navTree` (it was a new model that got saved)
+      @manifest.on 'change:id', (model, newValue, oldValue) =>
+        navTree = JSON.parse @get('navTreeStr')
+        # Find the node that has an `id` to this model
+        recFind = (nodes) ->
+          for node in nodes
+            return node if model.id == oldValue
+            if node.children
+              found = recFind node.children
+              return found if found
+        node = recFind(navTree)
+        return console.error 'BUG: There is an entry in the tree but no corresponding model in the manifest' if not node
+        node.id = newValue
+        @set 'navTreeStr', JSON.stringify navTree
+
       @manifest.on 'change:title', (model, newValue, oldValue) =>
         navTree = JSON.parse @get('navTreeStr')
         # Find the node that has an `id` to this model


  # Custom Models defined above are mixed in using `BaseContent.initialize`
  BaseContent = Backbone.Model.extend
    initialize: ->
      throw 'BUG: No mediaType set' if not @mediaType
      throw 'BUG: No mediaType not registered' if not MEDIA_TYPES.get @mediaType

  # This gets used by `DeferrableCollection` but is instantiated afterwards
  ALL_CONTENT = null

      else if mediaType
        config = model
        throw 'BUG: Media type not registered' if not MEDIA_TYPES.get mediaType

        # Create the model from a config and add it to the manifest
        ContentType = MEDIA_TYPES.get(mediaType).constructor
