small mods to tree-consensus for py3-compatibility