VE-1537: Fix problem with focusedNode

Templates are inserted "asynchronously" so focusedNode sometimes might be not yet defined when onTransact is called. Delaying it by setTimeout 0 solves the problem.