The Bug affects the [c=1] & [c=-1] tag (and maybe the UUIDs).
I tried making a system, that always gives the newest Villager [c=-1] a scoreboard value. But it seems that when I have 5 Villagers spawned, the first one gets the score, which the fifth should have.
Quick Showcase:
Villager 1 spawns -> Villager 1 gets value 1
Villager 2 spawns -> Villager 2 gets value 2
Villager 3 spawns -> Villager 3 gets value 3
Villager 4 spawns -> Villager 4 gets value 4
Villager 5 spawns -> Villager 1 gets value 5
Now Villager 1 has value 5 and Villager 5 has no value.
I think this is a problem with the [c=] tag, because I tried executing from the newest Villager "execute @e[type=Villager,c=-1] ~ ~ ~ setblock ~ ~2 ~ stone" and it did set the block over the wrong one at first, then it took the correct one. I tried this multiple times and it actually picked not the newest one 2 times in a row, before picking the correct one.
I hope this gets fixed in the next snapshot.
Maybe a duplicate of MC-49235