Fixed incorrect checking of PRINCIPAL_SELF permissions.