Fix cache race

Are there situations where `value.frozen?` returns something other than `false`? Just wondering the reason for this change.