Make sure nested template markers are destroyed

identifierPosition would return `false` but replaceAt would
turn this into 0, thus replacing/destroying at the beginning.

closes #172