Fix refactor bug in validation script due to missing state from original context.