jstests/aggregation/sources/lookup/lookup.js manually creates a ShardingTest, and because it can run in a read concern majority passthrough, the checkUUIDs hook can be overriden to run with majority read concern, which it does not support because the metadata collections it reads from are written with local write concern. SERVER-33876 made ShardingTest default to 1 node replica sets instead of standalone nodes, which exposes this problem because now locally written data is not guaranteed to be immediately seen by majority reads.
The checkUUIDs hook should await all operations to be committed before checking the shard metadata collections.