Fix PR 10635. When generating integer constants, the constant element type may