[1.7.x] Fixed #23667 -- Incorrect settings reference for language cookie.

Thanks jamesbeith for the report.

Backport of bedd439297 from master