Steps to reproduce it:
- Login as admin
- Install the Catalan (ca) language pack
- Go to Site administration > Language > Language settings
- Set "Language autodetect" = Yes
- Set "Default language" = Catalan
- Save changes
- Set your preferred browser language to Spanish
- Clear your browser caches and cookies
- Go to the Moodle login page
** You can replace Catalan/Spanish by any other languages you're more familiarised (except English).
The page is displayed in Catalan as this language was autodetected for you
The page is displayed in Catalan only if Catalan is defined in the "Choose your preferred language for displaying pages" list (Firefox) or "Settings -> Languages -> Language" list (Chrome).
For fixing this issue Andrew suggested we could do something to say "Use $CFG->lang when priority is < 0.9".