Mh_recover does not work

Hi,
matlab crashed during an mh run and I tried to restart it by adding mh_revover to the estimation command, but I received the error message pasted below. Could you tell me what this means…?
I have pasted below the exact estimation command I used. I am using Dynare 4.5.1, but the problem also appears if I use 4.5.7.
I tried to upload the codes including the metropolis folder so that you could reproduce the error message, but that did not work (I guess 3GB is simply too large…?). However, I can provide the files via an ftp server to whoever would like to look into the problem (I just need an email address).
Many thanks,
Ansgar

Estimation command

estimation(datafile=data_2C_June2018_nolink, xls_sheet=Sheet1, xls_range=A1:BN205,
first_obs=84,presample=15, nobs=112,
mode_compute=0, mode_file=Baseline19912018_mode, smoother, sub_draws=10000, lik_init=2,
plot_priors=0, graph_format=fig,
nograph,
nodiagnostic,
mh_replic=800000, mh_nblocks=3, mh_conf_sig = 0.95, mh_drop=0.3, mh_jscale=0.07, mh_recover)  OUTGAP_ea OUTGAP2_ea OUTGAP_us OUTGAP2_us;

Error message

Output argument "d" (and maybe others) not assigned during call to
"posterior_sampler_initialization>set_proposal_density_to_previous_value".
Error in posterior_sampler_initialization
Error in posterior_sampler (line 60)
    posterior_sampler_initialization(TargetFun, xparam1, vv,
    mh_bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);
    Error in dynare_estimation_1 (line 449)
            posterior_sampler(objective_function,posterior_sampler_options.proposal_distribution,xparam1,posterior_sampler_options,bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);
            Error in dynare_estimation (line 105)
    dynare_estimation_1(var_list,dname);
Error in Baseline19912018 (line 3600)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 223)
evalin('base',fname) ;

This is an unfixed bug, see https://git.dynare.org/Dynare/dynare/issues/1622

Than you Johannes, I see. Is there a workaround…? By changing the mh history file manually for instance?

Try replacing

        [d,bayestopt_]=set_proposal_density_to_previous_value(record,options_,bayestopt_);

by

        [d,bayestopt_]=set_proposal_density_to_previous_value(record,options_,bayestopt_,d);