VE-1028 Fix check for defined variable failing in Firefox