Changed CompositeState.endEnter and Region.endEnter to make history implementation clearer