Removed pointer aliasing to fix segmentation fault.

I removed an unnecessary piece of fairly complex piece of pointer
aliasing code. The code had undefined behavior and more
recent versions of gcc/clang would happily optimize it away leading
to segfaults.