This is still happening in 1.10. Have an iron farm with 20 villagers stored in 2 5x1x2 glass containers. AFK for several hours, no villagers come out. Walk away from farm, come back, my 20 villagers is now down to 10. I am certain they are escaping, because I see them outside the farm. They tend to cluster around one side of the enclosure. This is really difficult to deal with, because getting villagers into the enclosures is not easy.
Exact same issue I have.