Imports on demand on types

Handle correctly the case of star imports on inner classes.