Fix a case that could cause grouped messages to appear twice