added new intermediate node so that nested scope node is always the top level