public function getTagged(int $tag): TaggedType
    {
        if (!$this->hasTagged($tag)) {
            throw new \LogicException("No tagged element for tag $tag.");
        }
        return $this->_taggedMap[$tag];
    }