Very strange. When I try the same (4/4 measure with a whole-measure rest changed to 5/4) I get a whole and a quarter rests: both rests are individually selectable and selecting the whole measure selects both rests.

Was the measure empty in the first place? The code in the patch is only used when the measure(s) being changed contain a single whole-measure rest only. In all other cases, there is no change from previous behaviour.