Scripts class reference for custom classes

Hello,

Would anyone have any advice on the following issue:

I have a use case for referring to the "scripts/customerscripts" and the inherited "productscripts" in my custom script in which I use an inner class, but it doesn't appear to be as straightforward as it would be generally. I can seemingly make it work in the scripting tools alright, but it breaks down in db compilation.

As far as I know, the only way to do this is by passing the reference, for which I would need to define the scripts class's name. But it doesn't seem to work because the database compiler appears to expect a class name e.g. "scripts_[random string]", in which the random string appears to be specific to the 1IM environment I'm compiling. Apparently the aliases used in the scripting tools don't get translated. And even if I used that name instead I wouldn't be able to create portable scripts, and the scripting tools would produce error messages since they are not aware of the final name. And for all I know, it might not work properly anyway.

So, my questions are:
a) Is there a known valid solution around this issue, or
b) are there known reasons for this limitation that I should be aware of in case I would try some makeshift workaround?

My IM version is 8.1.2.

Thanks!