There's no rule against Garnett doing both jobs. The XO has a straightforward function: To back up the captain and keep order among the crew. That's not a job that requires her to be in a specific location. She can be XO anywhere, including the Engineering spaces, where her greater expertise can be put to good use. Anyway, it's not uncommon for an officer to wear more than one "hat" when part of a small crew. He doesn't have to. The choice isn't as hard as you think. Chandler's official title was Chief of Naval Operations, but his status as head of the US Military was solely a matter of President Michener's wishes. Rank and seniority were secondary concerns. Oliver has the same option. He can pick anybody he likes (Slattery, Green, hell Tex if he were still alive and wanted the job) and declare them head of the US military by virtue of the fact that they act on behalf of the Commander-In-Chief, and nobody can complain about it until they reconstitute a Congress. In fact, not even Congress could complain if he just named the person National Security Advisor.