WICKET-5585 Wicket Extension Automplete does not work well with JavaScriptFilteredIntoFooterHeaderResponse

(cherry picked from commit 1d057ace543e40ea4d6b2fd451f4eeb580cc902b)