Avoid direct seek in parse_header