If you are trading with a villager, (paper for example), there is a 20% chance each trade will unlock the villager. But in MCPE, this will never unlock the trade you are currently doing, so if you lock the paper trade, but the villager gets the particle effects that indicate he has unlocked, paper will still be locked.
Furthermore, when a villager unlocks, you generally have to open, close, and reopen the trade window in order to see trades unlocked. (Paper will still be locked, however).
This bug is serious because it is very difficult to keep a villager from becoming useless for trades if he doesn't have a large number of available trading options.