Restores masked secrets in an incoming value from the previous values, so a round-tripped MASK never overwrites a real secret. Only secret-keyed leaves treat the MASK sentinel specially (via the internal restoreMaskedValue).
restoreMaskedValue
Incoming (possibly masked) value from the UI.
Previous stored value to restore from.
next with MASK secrets replaced by prev's values.
Restores masked secrets in an incoming value from the previous values, so a round-tripped MASK never overwrites a real secret. Only secret-keyed leaves treat the MASK sentinel specially (via the internal
restoreMaskedValue).