Treat Def::Err correctly in struct patterns Make instantiate_path and instantiate_type a bit closer to each other
Closes #17001 Closes #21449 Closes #22992 Closes #23208 Closes #23442