remap_labels implementation (below) does not have const before std::map<int, int> lmap