fix for cyclicflow workflow ordering problem when graph is acyclic
re-fixed
added test for ordering bug when optimizer nested in solver
Merge pull request #1706 from naylor-b/justin_bug

fixed ordering issue when an optimizer is nested within a solver