semantic: Make the store and enum ensureResolved take a scope.