Fix an ICE with error types in a vec

Closes #16783 

r? @nikomatsakis