trie: fixed key calc in next/prev..