Clean up of PermissionAttachment-related code. Be less paranoid.