Fix the position of closing tag </li>

This </li> was missing, and then added in commit 91de91ede36c0fa4c9ddbc5961aa0e795f7b9dbb but to a wrong position. In that way only a category *with* child categories will have the closing tag.
The patch fixes the problem.