dictionary/balanced_tree: properly implement sequences