Fix the redundant import issue when generating surrogate sources.