Fixes #2184 SID not checked in admin/modules/templates.php