Fix repo validation in import

Fixes #7714