Fix mistake in retainSaves
isFirstOfSequence and isLastOfSequence are transient