If you just move everything into the if (!pinned) block, then it gets rid of the visual errors, but doesn’t let you re-order pinned tabs.

Still, it seems like an improvement.  ;)
Re-add some code.

This code executes when we have too many tabs, and the pinned tabs would scroll off the top, so we probably want to keep it live.
WIP - The start of the pinned tab implementation.
Merge pull request #1 from bwinton/pinned-tabs

If you just move everything into the if (!pinned) block…