Fix for #8042: Instead of loading value and casting, cast pointer and load.