fix #40711: Crash on select on score with slur ending on rest