Finally fixed @extend within a loop context

Added a test case so it doesn't break again, since I have been banging my head against this one for a couple of weeks now. Fixes #965 which details most of the issue.

Edit: Also, after the last of these few extends bug fixes are merged in - could you look at doing a minor version bump for npm?

Edit: After the last two commits I have made, I can finally generate the output from https://github.com/blakeembrey/pinch-grid properly!