Fix for histval block in the presence of auxiliary lead variables
Since 38152c34, the M_.endo_histval variable is generated via dynamic_set_auxiliary_dseries.m. The problem is that, for auxiliary variables corresponding to a lead, this will generate a NaN in M_.endo_histval. This is conceptually correct, since such variables are never used as initial conditions, but this is inconsistent with what we do with the "initval" block, and leads to crashes in some routines where we fail when there is a NaN. Therefore, replace these with a zero, as it used to be.
Showing with 2 additions and 1 deletion