When using is_ordset/1 with atoms and variables, the variables need to come before the atoms.
?- is_ordset([a,A]).
false.
fails because the variable is in the list after the atom.
However,
?- is_ordset([A,a]).
true.
succeeds because the variable is in the list before the atom.
Another example.
?- L = [_,_,A,B,a,b],is_ordset(L),write_term(L,[]).
[_722,_728,_734,_740,a,b]
L = [_, _, A, B, a, b].
true.