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