Fixed const issues with trie functions