Fix some tests to ensure the returned locale always belong to the localizationsArray