Improve test case for ifvarclass with functions