I should note that the code structure means that if you "change" a key, you're actually just deleting the old one and creating a new one. That probably isn't the behavior that you want.
At this point, documentation that you shouldn't change keys if users have selected them is really the only option.
We can look at other ways of handling this in the future.