VE-1485: Fix template insertion flow

https://wikia-inc.atlassian.net/browse/VE-1485