Shell/4213

[endlessm/eos-shell#4213]
This loop style is a bit unusual - I'd suggest making it something like
```
for (idx = 0; language_names[idx] != NULL; idx++)
  {
    /* do stuff */
  }
```

Also the `istream == NULL` check later relies on the ordering of how the `GError` is processed in this loop; it will fail printing the last error message set by the loop. I'd rather use `g_debug` in the loop after every failed attempt to load a keyboard tree, printing the error message, and then just use `g_error` without the `GError` message.