Do not make an unnecessary copy of DenseMap.