Fix ICE when a struct variant enum is imported from an external crate

Fixes the first case of #19340.
Fix ICE when a struct variant enum contains multiple fields

Fixes the second case of #19340.
auto merge of #19568 : barosl/rust/enum-struct-variants-ice, r=alexcrichton

This pull request tries to fix #19340, which states two ICE cases related to enum struct variants.

It is my first attempt to fix the compiler. I found this solution by trial and error, so the method used to fix the issue looks very hacky. Please review it, and direct me to find a better solution.

I'm also to add test cases. Where should I put them? Maybe `src/test/run-pass/issue-19340.rs`?
Merge remote-tracking branch 'upstream/master'