This bug came up on the Stan forums: https://discourse.mc-stan.org/t/wrong-gradient-in-updated-stan-unsure-if-rstan-or-stan-problem/20673 Gradients of this test model ...