Fix subscript integrality check to give a good error message if type inf fails See merge request !411