diff --git a/src/structural_transformation/symbolics_tearing.jl b/src/structural_transformation/symbolics_tearing.jl index 84cee928cd..b176a97a9b 100644 --- a/src/structural_transformation/symbolics_tearing.jl +++ b/src/structural_transformation/symbolics_tearing.jl @@ -592,7 +592,9 @@ function tearing_reassemble(state::TearingState, var_eq_matching, # respect non-1-indexed arrays # TODO: get rid of this hack together with the above hack, then remove OffsetArrays dependency - obs_arr_subs[arg1] = Origin(index_first)(obs_arr_subs[arg1]) + if !isone(index_first) + obs_arr_subs[arg1] = Origin(index_first)(obs_arr_subs[arg1]) + end end for i in eachindex(neweqs) neweqs[i] = fast_substitute(neweqs[i], obs_arr_subs; operator = Symbolics.Operator)