         // 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];

                styleDeclarations = advancedObject.getClassStyleDeclarations();
            }

            n = styleDeclarations.length;
            for (i = 0; i < n; i++)
            {
                styleDeclaration = styleDeclarations[i];

            }

            // Next are the class selectors
            n = universalSelectors.length;
            for (i = 0; i < n; i++)
            {
                styleDeclaration = universalSelectors[i];
                if (styleDeclaration)
                {
                    inheritChain =
