fixed a regression from c155922

The empty tags were not removed.