Rollback transaction in case of error in validation while importing xml Fixes #19991