Templates: Fixed a problem with template insertion.

- Inserting templates in visual mode with placement "insert" could cause
  rare problems interacting with the indent program.