Fix egregious bug in hasTrigger(), thanks to Brice Rebsamen. Fixes #16