added an error message when trying to import an undefined block from a trait