[BZ-973264] fix wildcard import with declared types