Avoids reading beyond the current buffer in comb_filter()