Handle nested tags.