Fixes #5324: Use ifvarclass instead of basic class syntax