Fix expansion of imported generic interfaces implementing imported types. Fixes #11241