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

These functions were removed by 3054d112a4b537c63a248dc59b6aa66f53d9f6dc, then then brought back -accidentally, I assume - by commit 4f974be7d2a6ce8e279f563723d3a4c02c265260. Might very well be that the latter is not how it was originally due to rebasing of Mark's branch.

Either way, due to that refactoring this fix will look different in 3.6.x, so merging this one for master and then trying to back port.