And the setup must be before the loop.
Most assuredly, not the case. Try it with the most trivial example.