DV.model.Chapters = function(viewer) {
  this.viewer = viewer;
  this.loadChapters();
};

DV.model.Chapters.prototype = {

  // Load (or reload) the chapter model from the schema's defined sections.
  loadChapters : function() {
    var sections = this.viewer.schema.data.sections;
    var chapters = this.chapters = this.viewer.schema.data.chapters = [];
    _.each(sections, function(sec){ sec.id || (sec.id = parseInt(_.uniqueId())); });
    DV._.each(sections, function(sec){ sec.id || (sec.id = parseInt( DV._.uniqueId())); });
    var sectionIndex = 0;
    for (var i = 0, l = this.viewer.schema.data.totalPages; i < l; i++) {
      var section = sections[sectionIndex];
      var nextSection = sections[sectionIndex + 1];
      if (nextSection && (i >= (nextSection.page - 1))) {
        sectionIndex += 1;
        section = nextSection;
      }
      if (section && !(section.page > i + 1)) chapters[i] = section.id;
    }
  },

  getChapterId: function(index){
    return this.chapters[index];
  },

  getChapterPosition: function(chapterId){
    for(var i = 0,len=this.chapters.length; i < len; i++){
      if(this.chapters[i] === chapterId){
        return i;
      }
    }
  }
};

DV.model.Chapters = function(viewer) {
  this.viewer = viewer;
  this.loadChapters();
};

DV.model.Chapters.prototype = {

  // Load (or reload) the chapter model from the schema's defined sections.
  loadChapters : function() {
    var sections = this.viewer.schema.data.sections;
    var chapters = this.chapters = this.viewer.schema.data.chapters = [];
    DV._.each(sections, function(sec){ sec.id || (sec.id = parseInt( DV._.uniqueId())); });
    var sectionIndex = 0;
    for (var i = 0, l = this.viewer.schema.data.totalPages; i < l; i++) {
      var section = sections[sectionIndex];
      var nextSection = sections[sectionIndex + 1];
      if (nextSection && (i >= (nextSection.page - 1))) {
        sectionIndex += 1;
        section = nextSection;
      }
      if (section && !(section.page > i + 1)) chapters[i] = section.id;
    }
  },

  getChapterId: function(index){
    return this.chapters[index];
  },

  getChapterPosition: function(chapterId){
    for(var i = 0,len=this.chapters.length; i < len; i++){
      if(this.chapters[i] === chapterId){
        return i;
      }
    }
  }
};

Remove duplicated _.each loop on sections
Remove duplicated _.each loop on sections

Looks like the original line got retained after
the move to "noConflict" underscore
