Gamemode Crashing when Moving to Addons (!IsValidGamemode)

So I am making a gamemode mod that derives from another existing gamemode, and it works completely fine when located in gmod’s ‘gamemodes’ folder, but when moved to /addons/[Gamemode Mod Name]/gamemodes/ it will crash with !IsValidGamemode when loaded. I have copy-pasted the exact same folder into this addons folder, so the code shouldn’t be the problem. I did the same with the individual folders, they all requested to merge when pasted in, proving that the folder names are correct. What is going on?

Additional notes: The gamemode is derived from a workshop mode by having this mode as “base” in the gamemode.txt. But it also uses DeriveGamemode() in some of the .lua files. Don’t know if it doesn’t like deriving from addon gamemodes when it itself is an addon or anything, is that it? Or maybe it needs a certain function that doesn’t properly derive?

It’s simple, don’t do that. © Garry

It is a bug with the game and you can’t do anything about it.

Don’t do what, derive or move to addons? Is there a way to make it work?

I wonder.