Don't create empty tags. Fixes #567