         {
             if (styleName is String)
             {
-                styleName =
-                    StyleManager.getStyleDeclaration("." + styleName);
+                chain = addStylesToProtoChain(String(styleName), chain, target);
             }
-
-            if (styleName is CSSStyleDeclaration)
+            else if (styleName is CSSStyleDeclaration)
+            {
                 chain = styleName.addStyleToProtoChain(chain, target);
+            }
         }
 
         chain = super.addStyleToProtoChain(chain, target);

            {
                if (headerStyleName is String)
                {
                    headerStyleName =
                        StyleManager.getStyleDeclaration("." + headerStyleName);
                }

                if (headerStyleName is CSSStyleDeclaration)
                    chain = headerStyleName.addStyleToProtoChain(chain, target);
            }
        }



    /**
     *  @private
     */
    private function addStylesToProtoChain(styles:String, chain:Object, target:DisplayObject):Object
    {
        var styleNames:Array = styles.split(/\s+/);
        for (var c:int=0; c < styleNames.length; c++)
        {
            if (styleNames[c].length) 
            {
                var declaration:CSSStyleDeclaration = 
                    StyleManager.getStyleDeclaration("." + styleNames[c]);
                    
                if (declaration)
                    chain = declaration.addStyleToProtoChain(chain, target);
            }
        }
        return chain;
    }
    
    /**
     *  @private
     *  A hash table of objects used to calculate sizes
     */
    mx_internal var measuringObjects:Dictionary;
