Add test for a nested loop