WICKET-4975 Remove an unused check