anchor.diff:                                          nspawned = 0_int_p
                                       end if
                                   else
  -                                    call create_spawned_particle_ptr(sys%basis, qs%ref, cdet, connection, nspawned, ispace, &
  +                                    call create_spawned_particle_ptr(sys%basis, qs%ref, cdet, connection, nspawned, target_space, &
                                                                            qs%spawn_store%spawn)
                                   end if
                                   if (abs(nspawned) >= bloom_stats%nparticles_encoded) &
  
positive.code:                             end if
                              if (nspawned_im /= 0_int_p) then
                                  if (imag) then
                                      target_space = ispace - 1
                                  else
                                      target_space = ispace + 1
                                  end if
  
negative.code:                                             cdet, qs%psip_list%pops(ispace, idet), gen_excit_ptr, qs%trial%wfn_dat, &
                                              logging_info, nspawned, nspawned_im, connection)
                              ! If imaginary parent have to factor into resulting signs/reality.
                              if (imag) then
                                  scratch = nspawned
                                  nspawned = -nspawned_im
                                  nspawned_im = scratch
                              end if
  
                              ! Spawn if attempt was successful.
                              if (nspawned /= 0_int_p) then
                                  if (imag) then
                                      target_space = ispace - 1
                                  else
                                      target_space = ispace
                                  end if
                                  if (determ_parent) then
                                      call create_excited_det(sys%basis, cdet%f, connection, f_child)
                                      determ_child = check_if_determ(determ%hash_table, determ%dets, f_child)
  