Fixes extends within a loop.
Merge pull request #960 from blakeembrey/extend-loop

Fixes @extend within a loop