Error on instantiating a map with duplicate keys