 				for (i = 0; i < newState.length; i++)
 				{
 					typedState = newState[i];
-					objectName = typedState[OBJECT_NAME];
-					className = typedState[CLASS_NAME];
-					sessionState = typedState[SESSION_STATE];
+					objectName = typedState[DynamicState.OBJECT_NAME];
+					className = typedState[DynamicState.CLASS_NAME];
+					sessionState = typedState[DynamicState.SESSION_STATE];
 					var oldTypedState:Object = oldLookup[objectName];
 					delete oldLookup[objectName]; // remove it from the lookup because it's already been handled
 					

					// If the class is the same as before, then we can save a diff instead of the entire session state.
					// If the class changed, we can't save only a diff -- we need to keep the entire session state.
					// Replace the sessionState in the new DynamicState object with the diff.
					if (oldTypedState != null && oldTypedState[CLASS_NAME] == className)
					{
						className = null; // no change
						diffValue = computeDiff(oldTypedState[SESSION_STATE], sessionState);
						if (diffValue === undefined)
						{
							// Since the class name is the same and the session state is the same,
							// we only need to specify that this name is still present.
							result.push(objectName);
							
							if (!changeDetected && oldState[i][OBJECT_NAME] != objectName)
								changeDetected = true;
							
							continue;

				{
					//note: there is no error checking here for typedState
					typedState = oldState[i];
					objectName = typedState[DynamicState.OBJECT_NAME];
					oldLookup[objectName] = typedState;
				}
				if (oldState.length != newState.length)
