I wanted to naively translate a list of integers into a finite domain set but I got this error which I am unable to interpret.

L = [1,3,5], list_to_fdset(L, S), X in S.
Domain error: `clpfd_domain' expected, found `split(2,from_to(n(1),n(1)),split(4,from_to(n(3),n(3)),from_to(n(5),n(5))))'
In:
[4] throw(error(domain_error(clpfd_domain,...),_1868))
[2] clpfd:drep_to_domain(split(2,from_to(...,...),split(4,...,...)),_1922) at /usr/lib/swipl/library/clp/clpfd.pl:3704
[1] clpfd:clpfd_in(_1988,split(2,from_to(...,...),split(4,...,...))) at /usr/lib/swipl/library/clp/clpfd.pl:1657

Note that the exact term representation of FD sets is unspecified and will vary across CLP(FD)
implementations or even different versions of the same implementation. FD set terms should be
manipulated only using the predicates in this section. The behavior of other operations on FD
set terms is undefined. In particular, you should not construct or deconstruct FD sets by
unification, and you cannot reliably compare FD sets using unification or generic term
equality/comparison predicates.