Fix _set_terminated handling when exitcode is None.