fix two bugs: new source job misses chances of finding eligible sockets. WhereComplex clause generation should use position number instead of name of the statistics