Set the 'must_close_session' flag at the end of close_session(), so