CRM-11925 Fix, cleanup for hook_permissions