Fixed, I think, after some more experiments. I put {{subst:#if:true| }} around it all. It works because whitespace is ignored at the beginning and end of #if statements.