Fix off-by-one error in sequence comparison code.