Resetting no_more_rows flag in tree-building logic