This can likely be fixed by using an AssetPostprocessor or the CompilationPipeline (requires 2017.3 or later).
CCU will still be in memory before the project recompiles and could makes this fix before the compilation, so it doesn't leave the project in a broken state.