Redmine 6327 - Interpret failing function calls in ifvarclass as class not set

This is a back port of a07d3b2362de3de1c5f8a43d29c3bcea87b96a3f to 3.6.x.
Nowhere tested - your test result should depend on this !