[BUGFIX beta] Allow tagName to be a CP with deprecation

Fixes #9743, which fixed a regression noted in #9742. Perhaps should also go into stable, certainly into beta.

In the future `tagName` CPs should throw an assertion, in 1.x they should raise a deprecation warning.