As I noted in the comments, you are doing the correct thing. LaTeX resets several things in the header but the list is rather ad-hoc and it's not that unusual that you need to ensure that the environment for any code that you put in the header is normalised.
Basically LaTeX currently restores the following things:
The document default font:
The normal space factor settings
Avoid writing label information on every page if a section head gets copied to a page heading
zero out baselines
\baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
Default document colour
Thus you will see that there is no notion of a single global resetting or a possibility of arranging the document scope such that settings within the page do not leak to the heading code.
Most multi-line headings will then also call
\@parboxrestore either directly or by putting the multi-line code in a parbox or minipage. That resets some additional parameters.
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
So an alternative to resetting (say)
\tabcolsep explicitly in your heading code would be to add its reset to
\@arrayparboxrestore That would mean that any
tabular nested in a
p column in the
longtable would get the reset values rather than the values used in the outer
longtable. So it depends on your requirements...