bpo-31492: Fix assertion failures in case of a module with a bad __name__ attribute. (#3620)

4 files changed