High voltage drop on Nano outputs caused by sketch

The sequence of presets selected: D9, D8, D7, D6, D5, D4, D3, D2.
With D9 selected, the voltage at the LED side of the resistor is 2.55V.
With D2 selected, the voltage at the LED side of the resistor is 4.03V.