Fix crash after using insert

See https://forum.dynare.org/t/dseries-insert-doesnt-carry-the-new-index/22386/5

clear all
load acetylene.mat
ds_example = dseries(y)
size(ds_example)
ds_nan = dseries(NaN, ds_example.dates, "inserted_Variable")
ds_example1 = insert(ds_example, ds_nan{1}, 1) % we succesfully insert a variable
size(ds_example1) % check what we’ve done
ds_example1{1} % works
ds_example1{end} % doesn’t work (ds_example1{2} and ds_example1{‘Variable_1’} don’t work either)

crashes with

Index exceeds the number of array elements. Index must not exceed 1.

Error in indexing (line 305) r.ops = o.ops(idx);

, presumably due to a problem with populating the command history.