Added a check on `version.deleted` and some tests.