Fixing #835: Bug in gradient of MXFunction graph with implicit function in it
Introducing implicitRK helper function