SP JS scope tree and reference to outer objects

The js object tree is created with JS_DefineObject(parent, child), e.g. js objects global(root), level_1(child of global), …, level_N(child of level_N_1, e.g. N-1). At each child a variable/property is added with JS::Evaluate(level_i, “var level_i_x=‘a’”).
If a script JS::Evaluate(level_N, “var level_N_y=global.level_1…level_N_1.level_N_1_x”) is executed it completes successfully.
If a script JS::Evaluate(level_N, “var level_N_y=level_N_1.level_N_1_x”) is executed it fails with error: ReferenceError: level_N_1is not defined.

What should be setup so the parent variable/properties are visible with the short path definition?