modified unittest for nested environments: added additional assert for identical symbols.