anchor.diff:  
       integer, allocatable :: expression(:) ! copy of surface list
       integer :: i            ! index for surface in cell
  -    integer :: n_surfaces   ! total number of surfaces to check
  +    integer :: n_surf       ! total number of surfaces to check
       integer :: n1           ! number of surfaces in current cell
       integer :: n2           ! number of surfaces in parent cell
       integer :: index_surf   ! index in surfaces array (with sign)
  
positive.code:     integer, allocatable :: expression(:) ! copy of surfaces list
      integer :: specified_sense ! specified sense of surface in list
      integer :: actual_sense    ! sense of particle wrt surface
      integer :: n_surfaces      ! number of surfaces in cell
      integer :: i               ! index of surfaces in cell
      integer :: surf_num        ! index in surfaces array (with sign)
      integer :: current_surface ! current surface of particle (with sign)
  
negative.code: 
      ! loop over all surfaces
      dist = INFINITY
      do i = 1, n_surf
         if (i <= n1) then
            ! in local cell, so use xyz_local
            x = p % xyz_local(1)
  