acer, kind thanks! Yes, I had confirmed that lfGn was being called with Digits=26 by using something like a print statement in lfGn. And I had tried a partial workaround of replacing the definition of f, in max2lfGn, by

f:= (m, s, H) -> evalf[digits+1](lfGn(X, m, s*s, H))

where digits is a variable containing the global value of Digits; as your comment indicated, though, this sometimes causes failure.

What I do not understand is why fdiff calls the function to be evaluated with Digits=26, even on the first call, when Digits=10 and optimalitytolerance=0.01. To me, this looks like far-from-optimal behaviour, if not a bug.