Correct bounds check so that single-end alignment works without segfault.