Okay, before I go deeper into your initial problem, here's some feedback:
- Having a global variable named "P" is near catastrophic. Make that a local variable.
- With LibSharedMedia, do not localize the media name. It won't be localized for anyone who is using a different AddOn than the one you are writing, and will most likely break LSM for other users.
- Get rid of embeds.xml. It was only used years ago by the AceUpdater, which is long defunct. Plus your ToC is loading a file, which in turn is loading more files. Just put all your library lookups directly into the ToC.
- There is no need to localize the word "Profiles"; AceConfig will do that for you.
- Move the creation of self.frames from OnEnable to OnInit. You only need to create the table once.
I'm sure there is more, and what I mentioned doesn't fix your actual problem, but it's a start.