Attempted fix for intermittent test failures around MessageInputStream