WICKET-5415 Do not initialize pages which were not rendered

Initialize the page for modal window because otherwise it ends with "Page expired" exception

(cherry picked from commit f36fa2002bd0ef6f1b304d820efa72b2dfa36db8)