Refactor AbstractGridCoverage2DReader to remove all direct calls to the variables that assume one layer.