Fixes tommy_trie_inplace when removing duplicate elements.
Adds more test coverage. Now at 99%.