At import of a member it may require that the record is already set to complete.
(For example 'computeDependence' at create of some Expr nodes.)
The record at this time may not be completely imported, the result of layout
calculations can be incorrect, but at least no crash occurs this way.
A good solution would be if fields of every encountered record are imported
before other members of all records. This is much more difficult to implement.
So DefinitionCompleterScopeExit will run To->setCompleteDefinition(false); after this function exits but this will be in effect during the import the base classes. I don't see how the tests you added hit that code.