anchor.diff:  
           ! From CAS work out the start of the active basis functions, the number
           ! of active basis functions and the number of active electrons.
  -        active_basis_offset = 2*(nel-cas(1)) 
  -        ! Note that nbasis is spin-orbitals whereas cas is in spatial orbitals
  +        active_basis_offset = nel-cas(1) ! number of core *spin* orbitals
  +        ! Note that nbasis is spin-orbitals whereas cas(2)=M is in spatial orbitals
  +        ! (as we use the conventional CAS definition).
           nbasis = min(nbasis, 2*cas(2))
           nel = nel - ( nel - cas(1) )
           if (uhf) then
  
positive.code: 
          end do
  
          deallocate(seen_ij, stat=ierr)
          call check_deallocate('seen_ij', ierr)
          deallocate(seen_iab, stat=ierr)
          call check_deallocate('seen_iab', ierr)
  
          close(ir, status='keep')
  
  
negative.code:         integer :: ir, ios, ierr
          logical :: t_exists
          integer :: active_basis_offset, rhf_fac
          integer, allocatable :: seen_ijij(:), seen_iaib(:,:)
          logical, allocatable :: seen_iha(:)
  
          namelist /FCI/ norb, nelec, ms2, orbsym, uhf, isym, syml, symlz
  
  