Fix for #6935

Tracks the `type_target` and `value_target` source imports separately to correctly warn about unused imports.