!$perms[$perm_key] should be !isset($perms[$perm_key]) in the i18n_access implementation of hook_form_alter to prevent "undefined index" php notices from being generated.