env GO111MODULE=off
! go build p
stderr 'must be imported as x'

-- p/p.go --
package p

import (
	_ "q/y"
	_ "q/z"
)
-- q/vendor/x/x.go --
package x
-- q/y/y.go --
package y

import _ "x"
-- q/z/z.go --
package z

import _ "q/vendor/x"
