bug caused by a template with no questions

see http://eden.sahanafoundatition.org/ticket/1332.
Shouldn't really be in this situation since templates need questions but the fix is easy to implement.