Rework r6163, which broke the "factory" role of a resource with realm set to `None`. Instead, replace that resource with the simpler to handle `None` value at the level of `IPermissionPolicy.check_permission`.
Fixes #6360. Thanks to jgerlach for the helpful report!