     @reportChanges()
 
   updateComponentsList: ->
-    @componentsTreema?.set('/', $.extend(true, [], @components))
+    # Before I was setting the data to the existing treema but then we had some
+    # nasty sorting/callback bugs. This is less efficient, but it's also less bug prone.
+    @buildComponentsTreema()
 
   onComponentsAdded: ->
     return unless @componentsTreema


  loadComponents: (components) ->
    for componentRef in components
      levelComponent = new LevelComponent(componentRef)
      url = "/db/level.component/#{componentRef.original}/version/#{componentRef.majorVersion}"
      levelComponent.setURL(url)


  makeThangComponentConfigView: (thangComponent) ->
    component = @supermodel.getModelByOriginal(LevelComponent, thangComponent.original)
    return unless component?.loaded
    config = thangComponent.config ? {}
    configView = new ThangComponentConfigView({
      supermodel: @supermodel
