Villagers are refusing to trade when putting the exact number of required items in a trading slot. They however accept the trade if 64 items are put but take more than what the villager advertises. For example, if a Cleric is selling 1 emerald for 3 gold ingots, putting 3 gold ingots will not work while putting a stack will but the villager will take 10 gold ingots for 1 trade instead of taking 3. See this video by Bite The Apple who discovered this as well one month ago : https://www.youtube.com/watch?v=VGvFBqfVjBo
Duplicate of MC-151282