Syntax check package-qualified imports (#9225)