Don't override customized environments in subshells

Only set up environment for top-level shells, and allow it to be
inherited normally.

Top level shells are usually login shells, but can also be
non-interactive non-login shells in certain cases, such as when
executing an ssh remote command.