 	                setPropertyValue(obj, relatedProps[i],
 	                        oldRelatedValues[i], oldRelatedValues[i]);
 	            }
-	        }
-	        
-	        // Clear our flags and override context.
-	        applied = false;
-	        parentContext = null;
-	        appliedTarget = null;
-        }
+            }
+        }
+        else
+        {
+            // It seems our override is no longer active, but we were never
+            // able to successfully apply ourselves, so remove our context
+            // listener if applicable.
+            removeContextListener();
+        }
+        
+        // Clear our flags and override context.
+        applied = false;
+        parentContext = null;
+        appliedTarget = null;
     }
 
     /**

	
	        // Set new value
	        setPropertyValue(obj, propName, newValue, oldValue);
	        
	        // Save state in case our value is changed again while applied.  This can
	        // occur when our value property is databound.
	        applied = true;
	        this.parentContext = parent;
        }
    }

    /**

     */
    private var oldRelatedValues:Array;
    
    //--------------------------------------------------------------------------
    //
    //  Properties
