Error with maximum likelihood estimation using Optimization

From what I can tell, the closure is the SciMLBase.NonlinearFunction to which DI.pullback is applied?
I’ve taken great care to avoid creating closures in DI when Enzyme is involved.