Don't ICE on bad extern paths

Closes #17990
I formatted this error like the other ones in the closure. Should those be changed as well?