minor fixes to pure import with new hasCode feature