Fix broken test

A trie t stores its children in an (unordered) Dict, so keys(t) will also be unordered. So, we should sort keys(t) before comparing it against a fixed list.