Can't open designer - module ImportError

When I try to open a project in the designer I get the following error (and the designer fails to open):

ImportError: Error loading module compliance: Traceback (most recent call last):
File "module:shared.compliance", line 25, in
ImportError: Error loading module compliance: Traceback (most recent call last):
File "module:shared.compliance", line 25, in
...........
ImportError: Error loading module compliance: Traceback (most recent call last):
File "module:shared.compliance", line 25, in
RuntimeError: maximum recursion depth exceeded

The compliance module was a script module in the shared library, but I deleted it and created a script package instead with the same name. After saving and closing the designer, I can't reopen it.

I still seem to be able to open a client window.

Is there any way I can modify the shared script modules without opening the designer?
Will restarting the gateway help?
How can I resolve this issue if I can't access the designer?

This is on Ignition 7.9.10

The only way I can think of so far is to download a gateway backup, modify the projects/resources table in the internal database, and restore to the gateway. I guess I would like to effectively roll-back the global project to the last known good version.
If this is the best option, what exactly needs to change in the internal database?
Is there a better way?

So, I tried starting the gateway using the auto backup database files, but without success. Next, I opened config.idb in DB Browser for SQLite and deleted all the “compliance” script resources, crossed my fingers, and restarted the gateway. It worked! I should be able to recover the scripts from the backup I made of config.idb and manually add them again in the designer.