linearscan: resolve gaps