Add proper nested scope information