Handle case when import canditates return no import containers.

The code always assumed that at least one import container
was returned. Added check to handle such case (see #10123)