The bug
If on a dedicated server, trades with villagers will never lock. If you trade, after a random number of trades the trade will be locked visually, but you will still be able to use it.
How to reproduce
Join a dedicated server.
Look for a villager and trade until it locks.
Try to trade again (click on the empty space).
The trade will work anyway. If it doesn't add more emeralds and try again.
If you exit the villager's menu and enter again the trade will not be locked.
Note: This will not work in singleplayer.
Can confirm for 19w11b. Video:
[media]