Fix pattern matching on cross crate newtype structs.

#6086