WICKET-5732 (code review with MArtin Grigorov)