anchor.diff:            return
          end if
   
  -       index_tally = tally_maps(i_map) % items(i_cell) % &
  +       index_tally = tally_maps(i_map) % items(i_item) % &
               elements(position(i_map)) % index_tally
  -       index_bin = tally_maps(i_map) % items(i_cell) % &
  +       index_bin = tally_maps(i_map) % items(i_item) % &
               elements(position(i_map)) % index_bin
   
          if (index_tally > i_tally) then
  
positive.code:        end if
  
         ! =======================================================================
         ! DETERMINE INDEX IN SCORES ARRAY
  
         ! If we have made it here, we have a scoring combination of bins for this
         ! tally -- now we need to determine where in the scores array we should
         ! be accumulating the tally values
  
         score_index = sum((bins - 1) * t % stride) + 1
  
         ! =======================================================================
         ! CALCULATE SCORES AND ACCUMULATE TALLY
  
         do j = 1, t % n_macro_bins
            ! Determine score
  
negative.code:     integer, intent(in) :: index_tally ! index in tallies array
      integer, intent(in) :: index_bin   ! index in bins array
  
      integer :: n                       ! size of elements array
      type(TallyMapElement), allocatable :: temp(:)
  
      if (.not. allocated(item % elements)) then
  