variables as options
Allow to declare variables of an outer problem (in a nested optimization) as options for the inner function to avoid treating the as inputs.
This fixes issues that arise with using the approx_totals
functionality in nested problems.