I found a really cool tutorial about how to build a villager trader hall. It had a distribution system when villagers arrive by minecart, they are ejected by an activator rail and then they are pushed down to a "cell".
I didn't notice, but the design was intended for a setup where the villagers are ejected to the right (i.e. they arrive from the vantage point of the screenshot). I built my hall in a way that the villagers arrive from the opposite direction, so they have to be ejected to the left. When I try to ride the minecart myself, everything works as expected (I'm ejected to the left and I fall into a cell. However, villagers are ejected in front of the minecart (as far as I can tell). Is there a way to hotfix this problem? The only info that I found is that Minecraft searches for the most suitable block uppon ejecting someone from a minecart. But the ejection of the villagers is unexpected, and I don't understand why.