         var formName:String = "";
         
         // Return nothing if we are a container 
-        if (component is Container)
+        var containerClass:Class = Class(getDefinition("mx.core.Container", component.moduleFactory));
+        if (containerClass && component is containerClass)
             return formName;
 
         // keeping this DisplayObjectContainer since parent returns
         // that as root is not a UIComponent.
+        var formItemClass:Class = Class(getDefinition("mx.containers.FormItem", component.moduleFactory));
         var par:DisplayObjectContainer = component.parent; 
+
         // continue looking up the parent chain
-        // until root (or application) or FormItem is found.
-        while (par && !(par is FormItem) &&
-               !(par is SystemManager) && par != component.root)
+		// until a FormItem is found
+        // stopping at the root or system manager
+        while (par && !(formItemClass && par is formItemClass) &&
+               !(par is ISystemManager) && par != component.root)
         {
             par = par.parent;
         }
 
-        if (par && par is FormItem)
-            formName = updateFormItemString(FormItem(par));
+        if (par && formItemClass && par is formItemClass)
+            formName = updateFormItemString(par);
 
         return formName;
     }

    //--------------------------------------------------------------------------

    /**
     *  Method for supporting state Accessibility.
     *  Returns true if an ancestor of the component has enabled set to false.
     */

import flash.accessibility.Accessibility;
import flash.accessibility.AccessibilityImplementation;
import flash.accessibility.AccessibilityProperties;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.events.Event;
import flash.system.ApplicationDomain;

import mx.core.IFlexModuleFactory;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.managers.ISystemManager;
import mx.resources.ResourceManager;
import mx.resources.IResourceManager;

