         // Otherwise we use the legacy Flex 3 logic for simple selectors.
         else
         {
+            // Get the styles referenced by the styleName property
+            if (hasStyleName)
+            {             
+                var styleNames:Array = styleName.split(/\s+/);
+                n = styleNames.length;
+                for (i = 0; i < n; i++)
+                {
+                    if (styleNames[i].length)
+                    {
+                        styleDeclaration = StyleManager.getStyleDeclaration("." + styleNames[i]);
+                        if (styleDeclaration)
+                            universalSelectors.push(styleDeclaration);
+                    }
+                }
+            }
+
             // Working backwards up the list, the next element in the
             // search path is the type selector
             styleDeclarations = object.getClassStyleDeclarations();
-            n = styleDeclarations.length;
+            n = styleDeclarations != null ? styleDeclarations.length : 0;
             for (i = 0; i < n; i++)
             {
                 styleDeclaration = styleDeclarations[i];

        var advancedObject:IAdvancedStyleClient = object as IAdvancedStyleClient;
        var styleDeclaration:CSSStyleDeclaration = null;

        var globalClassSelectors:Array = [];
        var styleName:Object = object.styleName;
        if (styleName)
        {
            if (styleName is CSSStyleDeclaration)
            {
                // Get the styles referenced by the styleName property.
                globalClassSelectors.push(CSSStyleDeclaration(styleName));
            }
            else if (styleName is IFlexDisplayObject || styleName is IStyleClient)
            {

        // because of the considerably more complex selector matches...
        if (StyleManager.hasAdvancedSelectors() && advancedObject != null)
        {
            // Find matching universal selectors
            var decls:Object = StyleManager.getStyleDeclarations("*");
            universalSelectors = getMatchingStyleDeclarations(decls, advancedObject).concat(universalSelectors);

            // If we had universal selectors, concatenate them with our type
            // selectors and resort by specificity...
            if (universalSelectors.length > 0)
            {
                styleDeclarations = advancedObject.getClassStyleDeclarations().concat(universalSelectors);
                styleDeclarations = sortOnSpecificity(styleDeclarations);
            }
            else
