A villager was summoned in using commands, with the NBT data: {Offers:{}}, so that he would have no trades. And he was in fact untradable. That is, until I logged out and logged back in, and he had generic villager trades.
The original villager had no AI as well, but I tested this with another villager that had AI. I also tried adjusting the profession level, the villager's experience level, and they all yielded the same result; the villagers would shake their head when I right clicked on them, but when I relogged there would be trades.
Duplicate of MC-157950.