I’ve got a library with a few villagers in it, one among them simply will not restock his Mending books. I’ve tried removing every other workbench, I’ve placed a bed under him, I’ve placed a bed in line of sight, I’ve stayed in the chunk he’s in and slept for several days. Nothing seems to work.
Coolish. Not for you but for the resolution.
I suspect the bed isn’t strictly necessary but he was stuck trying to pathfind to an illegal block and having a bed at night gave him a higher priority target and it reset the janky pathfinding.