How to reproduce:
Set time to 18000(midnight) to stop resupply
Summon two villagers (Villager A and Villager B) and turn them into cartographers
Buy 10 empty maps from Villager A
Buy 5 empty maps from Villager B (and close the trading interface)
Buy 5 empty maps from Villager B again **(and close the trading interface).
Villager A continues to sell empty maps for 7 emeralds, while Villager B decreases the price to 6 emeralds.
I think this behavior is inconsistent.
Similar problem happens to other kind of villager. Unlocking of trades seems not relevant.
Cannot reproduce, to me it doesn't make any difference whether I split this into two separate trades or not, I get the same discount either way.