Fix bug in offset list trimming