Revert "Fix aliasing warnings"

This reverts commit bc74c4106b97b16aa4dcf346882f666fd1f22bc0.

This is to allow merging a slightly different upstream commit.
Merge upstream to 12944. Includes the aliasing fixes.