WICKET-5417 this.replaceWith is broken when called from onInitialize

Allow calling #replaceWith() inside #onInitialize and #onBeforeRender