Fixes #5558: allow to use $ { } in variables and correct class condition...

... and reporting
You're missing parenthesis around the class arguments here.