Check only once if the table has a header row, instead of every row.
write_ascii_table
write_plain_table