Hm, and if we just merged the two query hashes here then the loop below can stay as it was.