private function checkOverlappingNames(array $maps): void
    {
        $index = 0;
        foreach ($maps as $type => $map) {
            $rest_maps = array_slice($maps, $index + 1, null, true);
            foreach ($rest_maps as $type2 => $map2) {
                $same = array_intersect_key($map, $map2);
                if ($same) {
                    throw new \InvalidArgumentException(
                        "Duplicating $type tokens and $type2 tokens: " . join(', ', array_keys($same))
                    );
                }
            }
            ++$index;
        }
    }