Build failure in current master after ( Merged Add Takeoff SimpleItem if first item is complex #7804)

Hi, the current master branch has a build failure due to the last commit:

The variable i is not declared.

Friedrich

Fixed (and now more characters to hit 20 char limit!)