First of all, thank you very much dealing with this problem.
Of course, the total derivative will give the missing (first) term of the solution if I put df=d\gamma. But this leaves me with the residual partial derivatives, which are not in accordance with my former route of transformation. Maybe...