fix #39811: Crash after removing multimeasure rests and adding a measure