Changed `extern crate foo as bar;` error message

I did not put the crate name in the error note, if that's necessary I'll look into it.

Closes #17709
Oh, wait, this should move to be before the `if` statement above (we want the span to point at the original ident, not at the `as` keyword).