Use Map instead of an object (related to issue 6850)