Don't make assumptions about the list functor

This change avoids a conflict with forthcoming SWI-Prolog versions.