         for (var i:int = 0; i < n; i++)
         {
         	// Type as Object to avoid dependency on SystemManager or WindowedSystemManager
-            var sm:Object = sms[i];
-            sm.regenerateStyleCache(true);
-            sm.notifyStyleChangeInChildren(null, true);
+            var sm:ISystemManager = sms[i];
+			var cm:Object = sm.getImplementation("mx.managers.ISystemManagerChildManager");
+            Object(cm).regenerateStyleCache(true);
+            Object(cm).notifyStyleChangeInChildren(null, true);
         }
     }
 

        if (update)
            styleDeclarationsChanged();
    }
}

}

import mx.core.mx_internal;
import mx.events.ModuleEvent;
import mx.events.StyleEvent;
import mx.managers.ISystemManager;
import mx.managers.SystemManagerGlobals;
import mx.modules.IModuleInfo;
import mx.modules.ModuleManager
