Ignore <template> when setting index

Not sure if this would be handy but it has helped when using Sortable on template driven lists. Prevents something like this:

```
<ul>
  <template>
    <li>Index 1</li>
  <template>
</ul>
```