Fix flaky test InboundMessageLossTestCase
(cherry picked from commit 7a0d336)
(cherry picked from commit e69cf69)