Add curly braces to workaround an MSVC bug.

MSVC can't parse this pattern for range-based for loops.