copyAndMutateByHookKey
Add or replace the entry for hookKey, preserving its existing CachedValue.deps when one is already present (and using NoDeps otherwise).
Add or replace the entry for hookKey; deps overwrites any previously stored deps.