Only do *&ex -> ex optimisation if there is no type punning involved
Merge pull request #3662 from ibuclaw/fix12900

Only do *&ex -> ex optimisation if there is no type punning involved