Add var to inner for loop

Fix conflict with iterator index in the stylesheet loop