Do not fire change events when ToggleButton/CheckBox/etc. do not actually change

Fixes #18232.

(cherry picked from commit 2a0b9c71240e02b1c4a3c845147f5f154b3acb78)