sleepwatcher: fix inreplace warning

Fixes #18389.