This might be a bit nicer if `i` was declared inside the block.