Fix a merging mistake which broke taskwait in templates

We need to retain the ability to transform executable directives without
associated statements. The upstream version does not yet have this ability.