      *  @return An unsorted Array of matching style declarations for the given
      *  subject.
      */
-    private static function matchStyleDeclarations(declarations:Object,
+    private static function matchStyleDeclarations(declarations:Array,
             object:IAdvancedStyleClient):Array // of CSSStyleDeclaration
     {
         var matchingDecls:Array = [];
 
         // Find the subset of declarations that match this component
-        for (var selector:String in declarations)
-        {
-            var decl:CSSStyleDeclaration = declarations[selector];
+        for each (var decl:CSSStyleDeclaration in declarations)
+        {
             if (decl.isMatch(object))
                 matchingDecls.push(decl);
         }


    /**
     *  @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 type:String = types[i].toString();
            if (StyleManager.hasAdvancedSelectors() && advancedObject != null)
            {
                var decls:Array = StyleManager.getStyleDeclarations(type);
                if (decls)
                {
                    var matchingDecls:Array = matchStyleDeclarations(decls, advancedObject);
