Stack_solve_algo=0 reports error

I am using dynare 4.5.1. The .mod I am using has a line like this

simul(periods=1000,stack_solve_algo=0);

and when I run it reports:

Attempted to access x(0,6); index must be a positive integer or logical.

But when I change to:
simul(periods=1000,stack_solve_algo=6);

it run without error.CSTcode.zip (18.5 KB)

@Aldo This is a bug arising from sim1_linear.m being used for linear models now. Thanks for reporting. You can keep track at https://github.com/DynareTeam/dynare/pull/1484