Fix buy logic for NPCs who sell from their inventory.