html export: fix missing closing </ul></li> in some cases