Take the type from the alloca, not the type to use for allocas. Fixes issue 59250.
mentioned in commit 600e9d33