On the bielliptic and bihyperelliptic loci