Set<GdlVariable> multipleVars = new HashSet<GdlVariable>();
//...which, of course, means we have to spot non-candidate vars
Set<GdlVariable> nonCandidateVars = new HashSet<GdlVariable>();
for(int i = 0; i < tuple.size(); i++) {
GdlTerm term = tuple.get(i);
if(term instanceof GdlVariable
&& !multipleVars.contains(term)) {
GdlVariable var = (GdlVariable) term;
if(candidateVars.contains(var)
|| nonCandidateVars.contains(var)) {