Use a code source -> protection domain cache
When running under a security manager, always grant self all permissions
Actually, we will simply always do it, so if SM is enabled later it will still work