`scopedImport` throws an `ImportError` if there is an exception during the build, I added this by analogy.