To test, just install a new staging/master Joomla as a multilingual site.
Load frontend.
You will get and undefined index error because no cookie is set at that time.
Also, on an updated formally existing multilang site, any link to another language item which is not a direct menu link will get a wrong sef (and therefore 404) as the code fetches the cookie lang_code.
successfull
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7159.