Skip duplicate imports referencing base files early, fixes #158