Minecart dismount position is not consistent.
Dismounting position for villager is different from dismount position of zombie pigman or zombie despite all having the same size.
To reproduce catch zombie, villager and zombie pigman in minecart. Place minecart on single activator rail and surround it with 1 block high wall of normal blocks. Then activate activator rails to force ejecting. Zombie and pigman will eject next to rails, when villager will eject on the rail.
Moreover all mobs will eject on the rail if you replace any block of blocks surrounding with rails, which is not intended as ejecting mobs should avoid ejecting on the rail as long as it is possible.
This bug was found while testing
MC-111726 and probably related to it.