Fixed detection of completely empty tags