Provide proper error when parsing import declarations.