EZP-22995: Additional fix for undefined variable

Additinal fix for #951, JIRA https://jira.ez.no/browse/EZP-22995

`$formTokenWasEnabled` var was removed but still being used on this block, causing an `Undefined variable` notice.