variable.rename and dataset.rename checked whether newName was taken before checking that name exists, so renaming a missing name onto a taken one said the new name already exists. Both now report the missing name first.