Wip 9173

An assert is correct almost always, but on closer inspection the conditional is needed here in the case where an MDS rank is being torn down and terminate_sessions has put all sessions into CLOSING indiscriminately.  Updated the patch.