Used $index instead of name to also work with not-selector–compliant names.
Merge pull request #554 from martinheidegger/master

Used $index instead of name to work with not-selector–compliant names