BATCH-2186: Backporting XSD validation to 2.2.x