Add Left/Right does not work if the selection contains the last note of a MIDI part

Steps to reproduce:

  1. Create an empty MIDI part and open it in a Key editor window.
  2. Draw a couple of random notes.
  3. Select all.
  4. Press Shift + Right. Observe that nothing happens.
  5. Press Shift + L. Observe that nothing happens.
  6. Close the MIDI part.
  7. Open the MIDI part again.
  8. Select all notes except the last.
  9. Test 4. and 5. again. Observe that it deselects/selects the notes as expected.
  10. Close the window.
  11. Open the MIDI part again.
  12. Select all except the last note.
  13. Press Shift + R. Observe that the last note is selected as expected.
  14. Deselect all notes.
  15. Select all notes (Cmd + A).
  16. Do 4. and 5. again. Observe that it deselects/selects the notes as expected.

Expected results: The Add Left/Add Right function should work as expected in all situations.

Actual results: Add Left/Add Right does not work after opening a MIDI part and selecting all, if the last note of the part is part of the selection.

Nuendo 13.0.20, macOS 12.7 (M1 + Intel, reproduced on two systems)