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:
\reset@font\normalsize
The normal space factor settings
\normalsfcodes
Avoid writing label information on every page if a section head gets copied to a page heading
\let\label\@gobble
\let\index\@gobble
\let\glossary\@gobble
zero out baselines
\baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
...
Default document colour
\normalcolor
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.
\def\@arrayparboxrestore{%
\let\if@nobreak\iffalse
\let\if@noskipsec\iffalse
\let\par\@@par
\let\-\@dischyph
\let\'\@acci\let\`\@accii\let\=\@acciii
\parindent\z@ \parskip\z@skip
\everypar{}%
\linewidth\hsize
\@totalleftmargin\z@
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
\parfillskip\@flushglue \lineskip\normallineskip
\baselineskip\normalbaselineskip
\sloppy}
\def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
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...