Fix reliance on message ordering in test