Fix NPE when removing NPC in "on death" action.