fix binding to replace and update last

This fixes issues where event bindings from a child reactive instance
are actually bound to the parent since the elements are replaced
first and then bound. This does not solve the bigger replace problem
but is a nice interim solution.