This modifies CTemplate::RemovePath.

As there was "todo" on this method, I removed recursion and introduced list::erase instead of list::remove.