This fixes an issue with keyboard layout detection reintroduced in #8960
The problem has already been fixed in #6688 but got lost after
refactoring.
The issue is that the layout specifier might be a comma separated list
with country specifiers i.e. `"at,us"` which was not correctly handled.