preserve branch ordering in TreeBuffer and update test_csv.txt