      */
     public function set moduleFactory(factory:IFlexModuleFactory):void
     {
+        _styleManager = null;
+        
         var n:int = numChildren;
         for (var i:int = 0; i < n; i++)
         {

    }

    /**
     *  @private
     *  Sets up the inheritingStyles and nonInheritingStyles objects
     *  and their proto chains so that getStyle() can work.

    //----------------------------------
    
    /**
     *  @private
     */
    private var _styleManager:IStyleManager2;

    /**
     *  Returns the StyleManager instance used by this component.
     *  
     *  @langversion 3.0
