Ignore <template> when setting index

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