More accurately detect header lines in read_one_header_line