WIP: Updates to attempt to identify problems with LBFGSB.

Change-Id: I587a8c5fb8d4417c90b05739eda756554abc794a
WIP: DO NOT SUBMIT:  This is to test rmoval of some possibly bad code.

Change-Id: Ic35cf159d6cf62d62a574269a62e23e7e45d855d