Open
Description
As diagnosed in #386, the function value_and_gradient!(f, grad, ::AutoReverseDiff, x)
returns wrong primal outputs y = f(x)
due to JuliaDiff/ReverseDiff.jl#251. #386 fixes it, but at the cost of one extra function call. The long-term fix is something like JuliaDiff/ReverseDiff.jl#261