fix ticket #3212 Import invalid library generates error