         {
             if (headerStyleName is String)
             {
-                headerStyleName = owner.styleManager.getStyleDeclaration(String(headerStyleName));
+                headerStyleName = owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
             }
         }
 

            if (styleNames[c].length) 
            {
                var declaration:CSSStyleDeclaration = 
                    owner.styleManager.getStyleDeclaration("." + styleNames[c]);
                    
                if (declaration)
                    chain = declaration.addStyleToProtoChain(chain, target);

        {
            if (headerStyleName is String)
            {
                headerStyleName = owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
            }
        }
        if (headerStyleName)
