Import instances when referencing qualified values

Resolves #667