# Variable scope in nested NMaximize, NMaxValue

I'm trying to use NMaxValue inside other statements (FindRoot and NMinimize). Those statements should bind variable names, but I'm getting weird warnings which seem to indicate that the variables aren't bound inside the constraints of the NMaxValue statement? Minimal example:

NMinimize[{NMaxValue[{f[x,y],1<x<y},x],1<y},y]

NMaxValue::bcons: The following constraints are not valid: {1<x,x<y}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
NMaxValue::bcons: The following constraints are not valid: {1<x,x<y}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
NMaxValue::bcons: The following constraints are not valid: {1<x,x<y}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
General::stop: "Further output of NMaxValue::bcons will be suppressed during this calculation."


Why are these constraints not valid? y should be in-scope because it's defined by NMinimize, right? Is this a bug?

-
Might need to define the inner function as taking a parameter, y, and returning a value. That will avoid issues with symbolic preprocessing not knowing a parameter will, in function invocations, have a real value and thus cause the inner optimization to return a numeric value. –  Daniel Lichtblau Jul 19 '13 at 20:43