Abstract :Nested structures in computable general equilibrium models enable diversity in substitution. However, using constant elasticity of substitution (CES) or constant elasticity of transformation (CET) surfaces as constraints brings about the possibility that the results of the optimization do not add up to the quantity implied by the optimisation one level up in the nest. This paper presents the problem in detail, and proposes a solution. The solution is exemplified in a dynamic general equilibrium set-up with endogenous labour supply divided to two tasks, which can be used as a template for broader applications on time allocation problems. Keywords : General equilibrium models, Nested optimisation problems, Labour supply