Fix propagation of index type
(grafted from 663e2458f7f7a0f6dd0edcc6427f2babce148dd9)

--HG--
branch : 3.2
extra : source : 663e2458f7f7a0f6dd0edcc6427f2babce148dd9
Fix a few Index to int buggy conversions
(grafted from 70173f2a5116bfdee586889b80c4ece16501a2f3)

--HG--
branch : 3.2
extra : source : 70173f2a5116bfdee586889b80c4ece16501a2f3