Triggering rollback when entitystate is changed from modified to unchanged

With this change, EF rejects pending changes on a tracked entity when it's status is changed from Modified to Unchanged.  
I added a change to move the location of the reset to after the flagAllProperties call, is this the change that you wanted?