fix(import): correct auto detect enclusure (refs #4999)