                 var decls:Object = StyleManager.getStyleDeclarations(type);
                 if (decls)
                 {
-                    var matchingDecls:Array = getMatchingStyleDeclarations(decls, advancedObject);
+                    var matchingDecls:Array = matchStyleDeclarations(decls, advancedObject);
                     classDecls = classDecls.concat(matchingDecls);
                 }
             }

        }

        return matchingDecls;
    }

    /**
     *  @private
     *  Returns an ordered map of unqualified class names, starting with the
     *  object's class name and then each super class name until we hit a stop
     *  class, such as mx.core::UIComponent.
     */
    private static function getUnqualifiedTypeHierarchy(object:IStyleClient):OrderedObject
    {
        var className:String = getQualifiedClassName(object);
        var hierarchy:OrderedObject = StyleManager.typeHierarchyCache[className];
        if (hierarchy == null)
        {
            hierarchy = new OrderedObject();

            var myApplicationDomain:ApplicationDomain;
            var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(object);
            if (factory != null)
            {
                myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
            }
            else
            {
                var myRoot:DisplayObject = SystemManager.getSWFRoot(object);
                if (!myRoot)
                    return hierarchy;
                myApplicationDomain = myRoot.loaderInfo.applicationDomain;
            }

            StyleManager.typeHierarchyCache[className] = hierarchy;
            while (!isStopClass(className))
            {
                try
                {
                    var type:String = NameUtil.getUnqualifiedClassName(className);
                    hierarchy[type] = true;
                    className = getQualifiedSuperclassName(
                        myApplicationDomain.getDefinition(className));
                }
                catch(e:ReferenceError)
                {
                    className = null;
                }
            }
        }
        return hierarchy;
    }

    /**
     *  @private
     *  Our style type hierarhcy stops at UIComponent, UITextField or
     *  GraphicElement, not Object.
     */  
    private static function isStopClass(value:String):Boolean
    {
        return value == null ||
               value == "mx.core::UIComponent" ||
               value == "mx.core::UITextField" ||
               value == "mx.graphics.graphicsClasses::GraphicElement";
    }

    /**

        // because of the considerably more complex selector matches...
        if (StyleManager.hasAdvancedSelectors() && advancedObject != null)
        {
            styleDeclarations = getMatchingStyleDeclarations(advancedObject, universalSelectors);

            n = styleDeclarations != null ? styleDeclarations.length : 0;
            for (i = 0; i < n; i++)
            {
                styleDeclaration = styleDeclarations[i];
                inheritChain = styleDeclaration.addStyleToProtoChain(inheritChain, uicObject);
                nonInheritChain = styleDeclaration.addStyleToProtoChain(nonInheritChain, uicObject);

                if (styleDeclaration.effects)
                    advancedObject.registerEffects(styleDeclaration.effects);
            }
        }
        // Otherwise we use the legacy Flex 3 logic for simple selectors.
