Fixed a misplaced conditional on Trigger::setFunction(). (issue #158)