Add clear test case for main failure with array iteration