The cost that is shown by the villager is different from the amount the game makes you pay when you trade.
The villager being traded with has been cured from being a zombie villager for its discount, and has been trading with repeatedly so the price should increase from the demand mechanic, but what is displayed by the client is the cost being at its lowest state, one, but when activating the trade the amount of books is lower then what the client original showed, and is lowered as the stack is returned to the inventory.
Related issues
duplicates
Attachments
Comments

[media]
Duplicate of MC-151282