When DefinedImportThunk and DefinedImportData symbols are created, a pointer to them is stored in the ImportFile class, stored as a pointer to the specific subclass. If these symbols are replaced, these pointers no longer point to this particular base class.
This fixes crashes that were possible before, by touching these symbols that now are populated as e.g. a DefinedRegular, via the old pointers with DefinedImportThunk type.
This is one way of solving the issue, the alternative would be to not store pointers to the subclass but actually check them on use.