I agree that its a nasty and annoying behaviour and it looks like some leftover from the former SUC (static unit check) which we had in MC15.
You may want to look up the explanation for the two new "pseudo-units" "zero" and "Zero" in the documentation. The doc calls them units, but they are labelled as units !?
You can avoid the undesired behaviour if you use zero (note the lower case z) instead of 0.
Nonetheless - unpleasant and non-intuitive.
I would rather like to get an error if I try something like 1m + 0 = instead of 1m +0 m =
I guess it would make more sense if "0" would be treated as "zero" and not as "Zero".
BTW, it has nothing to do with the stack function. Simply evaluate dum after you defined it and you will see the same effect.



From the Migration Guide:
Note
To provide more control over how numeral 0 should behave, PTC Mathcad
Prime 9.0.0.0 provides two built-in constants:
• zero (lowercase) — Represents dimension less 0. For example, zero + 1m
yields an error whereas 0 + 1m = 1m
Use variable zero to ensure that the quantity is always checked for correct
dimension, even when it has a magnitude of 0.
• Zero (uppercase) — Represents 0 of any quantity. It assumes whatever unit
is required by the computation. For example, Zero*m + Zero*s = 0
Use variable Zero to simulate compatibility with legacy Mathcad
treatment.
It is recommended that you always specify the desired unit with every magnitude
in mixed unit expressions.
EDIT: Concerning the (pseudo)units rad and deg
You don't need to copy & paste. If you use an inline evaluation when defining the matrix you can experience the same undesired effect.
