#1198 Added workaround for Sundials adjoint bug