Make sure that we have a type on our relation when we copy the scope over Fixes #17603