Fixing template depth count in certain fast-tracked template patterns.
Fixes issue #169.