Add stacked-based scoping