Isn't start.kmer_idx always 0 here and therefore abs(mid_kmer - i) is always less than mid_kmer making this test always true?