Fix contrib.messages tests for discovery.