Issue with dotted names for names in zcml files - zope.configuration.exceptions.ConfigurationError: Invalid value for 'name'

I came upon this when upgrading an old Plone 5.1 to Plone 5.2 using buildout.

When I attempted to launch an instance I get this output:

zope.configuration.exceptions.ConfigurationError: Invalid value for 'name'
...
plone/buildout-cache/eggs/plone.app.event-3.2.14-py2.7.egg/plone/app/event/browser/configure.zcml", line 8.4-12.10
    InvalidValue: plone.app.event

As a quick experiment I edited the configure.zcml file of the plone.app.event package and changed the line:

  <plone:static
        name="plone.app.event"
        type="plone"
        directory="resources"
        />

to

  <plone:static
        name="plone_app_event"
        type="plone"
        directory="resources"
        />

This resolved that issue but then I got this:

zope.configuration.exceptions.ConfigurationError: Invalid value for 'name'
    .... plone/buildout-cache/eggs/plone.app.discussion-3.4.9-py2.7.egg/plone/app/discussion/browser/configure.zcml", line 142.4-146.10
    InvalidValue: plone.app.discussion.javascripts

Again this was resolved by replacing the dots with underscores:

  <plone:static
        name="plone_app_discussion_javascripts"
        type="plone"
        directory="javascripts"
        />

The pattern repeats itself...
It seems that the allowed characters for names of static resources has been changed.
It does not allow dots or dashes ('.','-')... my current hunch is that I need to change the version of my static resource package.

The actions above can't be the fix, they are just a temporary way of identifying the issue.
It's clear that a setting in a package has changed which makes plone static resources no longer accept dotted and dashed names.
This happened when I upgraded a site to Plone 5.2 from Plone 5.1.
Not sure which package is causing this yet.

I was able to get this to work by pinning the version of zope.configuration

[versions]
...
zope.configuration = 4.1.0

So my guess is that newer versions of the zope.configuration do not allow dotted or dashed names.

This is working fine for me in the Plone core development buildout with Plone 5.2 on Python 2.7. There zope.configuration 4.4.1 is used.

Are you overriding any Plone or Zope versions?

I think I did override something. I had a whole pinned.cfg file as an extends, which I had to comment out.