Fix a bug when dynamic grids are used together with scalar inputs
The scalar input lowering was incorrectly assuming that its going to be the `i`th input
to the HLO, which was incorrect even before dynamic grids were a thing (but only when
fusions happened, so it was never uncovered before).
PiperOrigin-RevId: 606998887