Transpose grids as we render the grid.

Before this patch, we would transpose grids once, which caused a
problem where a reused grid would only be transposed once.

See: https://mail.google.com/mail/u/0/#inbox/1484b917bff1005b (Private)