Fixes for Trie ref count for node deletion.