bugfix: do not prepare the query outside the loop
bugfix: do not prepare the query outside the loop

Ensembl/ensembl-compara,Ensembl/ensembl-compara,Ensembl/ensembl-compara,Ensembl/ensembl-compara,Ensembl/ensembl-compara,Ensembl/ensembl-compara,Ensembl/ensembl-compara,Ensembl/ensembl-compara