LPS-37809 New algorithm when prepending locale to the URL