History bug regarding #2989 and #2963

Add braces for the "for(" block.