I'm not suggesting there is any workaround. I'm suggesting your setup is not a common one as the security manager should be set globally once and for all.
I'm having a look right now.