comparison: introduce var_sym_eq() helper function