Tried to make nested <li> handling more consistent