Fixed issue with empty locale cookies, they caused an infinite loop. refs #18916