sval: take the type into consideration when doing an sval_cmp_val().