ForwardDiff evaluation of objective in Optim returns wrong result (objective uses DifferentialEquations pkg)

Please read the first part of this post: Please read: make it easier to help you.

You should provide a minimal working example.