Fix IRI Expansion algorithm

I broke it in fcedc880ebaca919ee409a6edced8ac9ea943330 :-(