fix #1130 undefined error message for deprecated modifier

Due to a discrepancy how `callModifier` is called from the templates,
in real templates an undefined message is logged, contrary to the test
(EscapeModifierLogTest) which is not executed in the scope of the template
but directly.