Fixed index checking during export of route arrays.