WICKET-5558 Autolinking does not always work in inheritted markup

(cherry picked from commit d7a75a0462d7fccdc437ddc84cbb49faa432e3b1)