Treat exec from subshell as if forked

This removes weird behaviour when optimising the last command.
In particular SHLVL is correct from a subshell executed as the last
command.