NaN doesn't make a good array index