Not exactly sure why this happens since I cannot replicate it on my end, but I assume the shopkeeper interface didn't have the item selection reset before it loaded, and that caused a crash when the interface was trying to read a wrong item to get the item flags for. I've added a call to reset the item selection before loading up the shopkeeper, so hopefully that resolves the issue. The change should hopefully appear in the next release.