fix merge in schedule templates added in f97529656

if (!$this->$name) ends up as if(!0)...

Fixes #11775

(cherry picked from commit 08b94cea6346ebeb94edf98ecb5d7b7dd8555560)