Fix #23406: Crash on copying multiple selected chord names.

The map key used to sort by track and tick the elements to copy overflowed.
Merge pull request #531 from mgavioli/Fix_23406_Crash_on_chord_names_copy

Fix #23406: Crash on copying multiple selected chord names.