Protect the freeing of current_hash under mutex_lock to prevent racing on it when set_curblock is hit concurrently.