It would take some effort to extract selfcontained code from the mass of code wherein this optimization is embedded. Moreover I would have to obtain permission from my employer to do so.

This is not efficient.
However some things are evident from the trace log which I have submitted:
(a) L-BFGS-B does not identify itself even though it was called overriding the method
parameter in optim.
(b) Optim  reports as final converged minimum value a function value that is much larger than
others computed during the optimization.

I think we can agree on calling this a bug.
	[[alternative HTML version deleted]]

