Backport of #4557. Improve offline validation for71 x