The "in-class initializer" expression should be set in the field of a
default initialization expression before this expression node is created.
The CXXDefaultInitExpr objects are created after the AST is loaded and
at import not present in the "To" AST. And the in-class initializers of
the used fields can be missing too, these must be set at import.
This fixes a github issue #54061.
It is unfortunate to have such an API. Anyway, the assertions you placed seems to address this mess. Good.