fix #26516: crash on repitch

There is still a small issue with tie.
* Create a score with a quarter C tied to a quarter C
* Select the first one, enter note input, enter repitch
* move cursor to the second note, press D

--> Result : We see a C "tied" to a D
--> Expected result: not sure, maybe we need to make sure that user can't select the second note of a tie?