trie: fixed several issues with kvs inplace add.