Ignore template nodes for index

Ignore template nodes when calculating the index of dropped node