My only concern with this PR is that this exception is pretty nasty. It does the job, but like a sledgehammer. I'd much rather implement a nice handling of this, in the same way as if there is uncommitted changes (e.g. discard changes, review etc.), but I don't know how to implement this currently.