This is directly caused by MC-126413, which is saying that you need the "type" tag in order for entity conditions to work.
Just putting this here because Mojang doesn't really tend to care about errors if they don't affect the vanilla survival game, and this clearly affects vanilla survival.
To reproduce:
Trade with a villager in a new, unmodified world.
→ Observe that you don't get the advancement.
Cannot confirm. The advancement works fine for me.