Fix crash bug on Windows.

Mutating the DenseMap here seems to cause the Windows executable
to crash. Don't use operator[] to access possibly nonexistent key.