I have pushed a commit (30cbcdbb55f5ed8acd8785eac7e5d0d7bac803dd) that should really fix ticket #157.
This commit moves the information given in the histval block for endogenous variables in M_.endo_histval. Previously this was put into oo_.endo_simul, which was creating a lot of trouble. Now the preprocessor always initialize oo_.endo_simul to []. It is the job of make_y_.m, stoch_simul.m and dyn_forecast.m to fill in that structure.
I have tried to propagate this change to relevant places but I may have forgotten some. Please double check.
Also, the information given in histval for exogenous and exogenous deterministic variables is still stored in oo_.exo_simul/oo_.exo_det_simul. I would prefer to have them in M_.exo_histval and M_.exo_det_histval, but this is a more far reaching change since it would also imply to change the implementation of the shocks command (which also stores its information in oo_.exo_simul/oo_.exo_det_simul). What is your stance on this?
Best,