Fix issue #23985.

Furthermore implements deleting all the measures covered by the multi-measure rest when deleting the measure containing the mm rest.