Test case for respecting template element index

If template has siblings, clones must be inserted to maintain location
relative to siblings.