      */
     public function setStyle(styleProp:String, newValue:*):void
     {
-        StyleProtoChain.setStyle(this, styleProp, newValue);
+        // If there is no module factory then defer the set
+        // style until a module factory is set.
+        if (moduleFactory)
+        {
+            StyleProtoChain.setStyle(this, styleProp, newValue);
+        }
+        else
+        {
+            if (!deferredSetStyles)
+                deferredSetStyles = [];
+            deferredSetStyles.push(styleProp);
+            deferredSetStyles.push(newValue);
+        }   
+    }
+
+    
+    /**
+     *  @private
+     *  Set style that were deferred because a module factory was not
+     *  set yet.
+     */
+    private function setDeferredStyles():void
+    {
+        if (!deferredSetStyles)
+            return;
+        
+        var styleProp:String;
+        var newValue:*;
+        
+        var n:int = deferredSetStyles.length;
+        var i:int = 0;
+        while (i < n)
+        {
+            styleProp = deferredSetStyles[i++];
+            newValue = deferredSetStyles[i++];
+
+            StyleProtoChain.setStyle(this, styleProp, newValue);
+        }
+        
+        deferredSetStyles = null;
     }
 
     /**


    /**
     *  @private
     *  There is a bug (139381) where we occasionally get callLaterDispatcher()
     *  even though we didn't expect it.
     *  That causes us to do a removeEventListener() twice,

    private var transitionFromState:String;
    private var transitionToState:String;
    
    //--------------------------------------------------------------------------
    //
    //  Variables: Creation
