Make invalid states harder to write in TypeScript.
Recent revisions are kept. Restoring one creates a new revision.