TS: Add missing outer scope for case alternatives.