[Issue 10232] assert() at shutdown if a syncrepl session is in refresh