Only check clicking on NPC when not talking to an NPC

Fixes #1260