Fix off-by-one in read_tree_recursive