map: don't create useless </ul><ul> sequences