Remove the path from the map before saving it in our trie.