Fixes a race condition where a hash value could be overwritten from different threads, causing corruption