Add a testcase to loop-idiom to cover PR14241 when we start handling