fixes build_validations_from_dynamic_attrs checking for wrong class type