Improve explicit import handling