Fix crash on note range selection

When selecting a range of notes:
- Selecting in any staff other than the first causes an assertion.
- Selecting the end note first and the start note after, yields an incorrect selection.

I know that selection is being worked on, but having the program crashing when selecting note ranges in any staff other than the first is quite a shop-stopper. If anything else, this code could be a suggestion for further work on selection .