Build compound scope.