Fix query not used in array for constructing sql for geo index.