 	
 	// Set callback data needed for applying fftshift
 	h_callback_data->inverse = _real_out || (!_real_in && inverse);
-	h_callback_data->do_fftshift = _do_fftshift;
+	h_callback_data->do_fftshift = _do_fftshift ^ _do_fftshift_before;
 	h_callback_data->ndim = _axes.size();
 	for( int d=0; d<h_callback_data->ndim; ++d ) {
 		h_callback_data->shape[d]    = in->shape[_axes[d]];

	size_t           _workspace_size;
	std::vector<int> _axes;
	bool             _do_fftshift;
	bool             _using_load_callback;
	thrust::device_vector<char> _dv_tmp_storage;
	thrust::device_vector<CallbackData> _dv_callback_data;

	BF_CHECK_CUFFT( cufftSetWorkArea(_handle, tmp_storage) );
	void* idata = in->data;
	void* odata = out->data;
	
	// Apply a pre-call fftshift to deal with c2r problems in CUDA 10.1+
#if CUDA_VERSION >= 10100
	if( _do_fftshift_before ) {
		/* Pre-call fftshift here */
	}
#endif
	
	// TODO: This sync is needed to ensure that the previous h2d copy of
	//         h_callback_data has finished before we overwrite it.
