Trying to trade with emeralds in locked trade slots, even when it doesn't accept emeralds as a trade item, results in being able to trade for items in other trade menus the villager offers.
To reproduce:
1. Unlock some trades on a villager.
2. Lock out a trade on the villager that doesn't involve emeralds.
3. Try trading with various numbers of emeralds.
This is a feature so you don't have to scroll through all options if you already know which trade you're getting.
Duplicate of MC-3980.