Fix min/max cluster transaction queries to support set of clusters
larger than 4.