map: Avoid emitting an unclosed ul element if the map is empty. (harishcm)