Fixed issue #9050: Template permissions for a user are lost after global permissions are saved