Fix an off-by-one error in SmudgeLayer.

Fixes #4139.