Improve handling of empty cert tags. Fixes #9099
(cherry picked from commit ca4456b95c53e89cf6b428a999ae15367b753073)
Improve handling of empty cert tags. Fixes #9099
(cherry picked from commit ca4456b95c53e89cf6b428a999ae15367b753073)