Fix build when WATCH_INACTIVE is enabled.
Merge branch 'master' into diagnostic