added test for ordering bug when optimizer nested in solver