LPS-49395 don't collapse empty tags (forward port)