Guard against adding blank list-items if license/search_form are blank

When mucking around with a naked base.tmpl template, empty list-items were appearing if not LICENSE or search_form were defined.  This minimally invasive tweak should remove those.