It definitely wasn’t possible in the past, tried it myself, more than once.
After it didn’t work back then I searched the forum and found this thread. In this thread @clang thankfully came up with the solution of moving ASObjC into a script library. Since then I’ve been using his approach.
Again, tested quite often, it wasn’t possible in the past.