Programmatically defining and using handlebars templates

This last bit of code works, but I got this error when coming back to the view where I used it:

Uncaught Error: Assertion Failed: Emptying a view in the inBuffer state is not allowed and should not happen under normal circumstances. Most likely there is a bug in your application. This may be due to excessive property change notifications.

@martin Yea, I found that issue after I posted my bit of code. I am looking for a workaround.

I got the same. Did you manage to solve it?

Solved in a recent version of handlebars