fixed ordering issue when an optimizer is nested within a solver