Fix bug in s:is_valid_heading_line