another possible solution to issue 1524, without monkey patching
allow conditional templates, although no compilation, thanks Anthony