Hello all. My model with `reduce_sum_static`

fials to compile with the error that begins with the following (the entire error is really long):

```
ROR:cmdstanpy:file model.stan, exception ERROR
In file included from /include/c++/4.9.3/bits/move.h:57:0,
from /include/c++/4.9.3/bits/stl_pair.h:59,
from /include/c++/4.9.3/bits/stl_algobase.h:64,
from /include/c++/4.9.3/bits/char_traits.h:39,
from /include/c++/4.9.3/ios:40,
from /include/c++/4.9.3/istream:38,
from /include/c++/4.9.3/sstream:38,
from /include/c++/4.9.3/complex:45,
from stan/lib/stan_math/lib/eigen_3.3.7/Eigen/Core:96,
from stan/lib/stan_math/lib/eigen_3.3.7/Eigen/Dense:1,
from stan/lib/stan_math/stan/math/prim/fun/Eigen.hpp:22,
from stan/lib/stan_math/stan/math/rev.hpp:4,
from stan/lib/stan_math/stan/math.hpp:19,
from stan/src/stan/model/model_header.hpp:4,
from model.hpp:3:
/include/c++/4.9.3/type_traits:512:12: error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) instantiating ?struct std::__or_<std::is_lvalue_reference<std::_Tuple_impl<63ul, const int&>&>, std::is_rvalue_reference<std::_Tuple_impl<63ul, const int&>&> >?
struct is_reference
^
```

The model is attached. Any ideas whatâ€™s wrong will be highly highly appreciated!

model.txt (6.6 KB)