Fixed compile bug

After e29efd7, a bug was introduced that caused the second compile run to fail when the boolean showsubtaskboxes was set. This is now corrected, and I've verified that the template looks as it should (thanks @sschober, @berb).