Slider: Don't allow a slider's value to exceed its max

Fixes #9376
Closes gh-1016