Deduplicate a template.

Deduce the constness of map_find's returned pointer from the constness
of the map itself.