Fix: trie: fixes regression caused by ref count refactoring