       name = namespace.name
     @_setChildNamespaceProps name, namespace
     @allNamespaces[@namespacePath] = namespace.initAsSubNamespace name, @
+
+    if @[name]
+      @namespaces[@namespaces.indexOf @[name]] = namespace
+    else
+      @namespaceNames.push name
+      @namespaces.push namespace
+
+    @[name] = namespace
+
     namespace
 
   isFunction = (f) -> typeof f == "function"

    @modules = []
    @moduleNames = []
    @namespaces = []
    @namespace[name] = @
    @namespace.namespaces.push @
    @

  @getNamespacePath: -> @namespacePath

  @namespace: null
  @allNamespaces: {}
  @namespaces: []
  @namespaceNames: []
  @modules: []
  @moduleNames: []
  @_name: "Base"
