      */
     public function removeStyleClient(styleClient:IAdvancedStyleClient):void
     {
-        if(advanceStyleClientChildren && advanceStyleClientChildren.length != 0)
-        {
-            var i:int = advanceStyleClientChildren.indexOf(styleClient);
-            if(i!=-1) {
-                advanceStyleClientChildren.splice(i, 1);
-                styleClient.styleParent = null;
-
-                styleClient.regenerateStyleCache(true);
-
-                styleClient.styleChanged(null);
-            }
+        if(advanceStyleClientChildren && 
+            advanceStyleClientChildren[styleClient])
+        {
+            delete advanceStyleClientChildren[styleClient];
+            
+            styleClient.styleParent = null;
+            
+            styleClient.regenerateStyleCache(true);
+            
+            styleClient.styleChanged(null);
         }
     }
     

import flash.text.TextFormatAlign;
import flash.text.TextLineMetrics;
import flash.ui.Keyboard;
import flash.utils.getQualifiedClassName;

import mx.automation.IAutomationObject;

    /**
     *  @private
     */
    mx_internal var advanceStyleClientChildren:Dictionary = null;

    /**
     *  Adds a non-visual style client to this component instance. Once 
