Add -mode-hook exclusion to lambda functions as well. Issue #299