Check that the new id is not used when renaming a resource.