         {
             loc_end = inside;
         } else {
-            assert(feature_end > alignment_window.y);
             loc_end = right;
         }
 

                                              db.reference_window_start.size());

        // compute the initial vcf range
        uint2 vcf_range = make_uint2(vcf_start - db.reference_window_start.begin(),
                                     vcf_start - db.reference_window_start.begin());

        vcf_range.x = vcf_start - db.reference_window_start.begin();
        vcf_range.y = vcf_range.x;

        }

        // expand the start of the range backwards to find the first feature that overlaps with our alignment window
        while(vcf_range.x >= 1 &&
              db.reference_window_start[vcf_range.x - 1] + db.alignment_window_len[vcf_range.x - 1] >= alignment_window.x)
        {
            vcf_range.x--;
