Fix usage of View.replaceWith()