Rehash only when a new key is added. Fixes #5886
Merge pull request #5894 from JuliaLang/kms/rehash_update

Rehash only when a new key is added. Fixes #5886