I issue this type of bug too, I think it's because when we use a different mcleaks account, our dogs, cats or ocelots don't recognise us. The problem isn't caused after a snapshot because I've had it for one year. If you think using mcleaks is acceptable, please try to fix that bug.
Important discovers!
I discovered that this bug works only if the block up the villager is a trapdoor (not the one you see in the screen shot, the one behind on the head of the villager). So now I can fix the bug while putting a solid block on their heads. For me the problem is solved, but the bug still exists if you put a trapdoor on the villagers, so if you want you can continue working on it. Thanks for your help!