Ubuntu: 12.04 wrong layout when using Logitech Keyboards

I had a strange bug after installing Ubuntu 12.04 Precise Pangolin or Xubuntu.
Even when i selected “German” keyboard layout while installation, after a reboot the keyboard layout always switched back to English when using my Logitech K400 keyboard. When using other keyboards the bug did not appear.
The solution was to add a second keyboard layout like “German (without accents)”, what stopped switching back to English layout when using my Logitech K400 keyboard.