 		// to the child list until late into the startup sequence.
 		// Make sure we call regenerateStyleCache()
 		// on the top level window even if it isn't a child yet.
-		if (!foundTopLevelWindow && systemManager.topLevelWindow is IStyleClient)
-			IStyleClient(systemManager.topLevelWindow).regenerateStyleCache(recursive);
+		if (!foundTopLevelWindow && topLevelWindow is IStyleClient)
+			IStyleClient(topLevelWindow).regenerateStyleCache(recursive);
 	}
 
 	/**

			if (child)
				child.regenerateStyleCache(recursive);

			if (systemManager.isTopLevelWindow(DisplayObject(child)))
				foundTopLevelWindow = true;

			// Refetch numChildren because notifyStyleChangedInChildren()

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.events.IEventDispatcher;

import mx.core.IFlexDisplayObject;
