Currently the marc encoder only serializes to marc21 if a lot of validations are true.
Hbz/Verbundgruppe has a use case where for the it is more important to change the form from marcxml to marc21 than having valid marc21.
The transformation breaks if the data is not valid at the moment.
I therefore suggest to make the validation of the leader and controllfields optional.