diff --git a/packages/babel-plugin-proposal-object-rest-spread/src/index.js b/packages/babel-plugin-proposal-object-rest-spread/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/babel-plugin-proposal-object-rest-spread/src/index.js
+++ b/packages/babel-plugin-proposal-object-rest-spread/src/index.js
@@ -455,6 +455,11 @@ export default declare((api, opts) => {
           try {
             helper = file.addHelper("objectSpread2");
           } catch {
+            // TODO: This is needed to workaround https://github.com/babel/babel/issues/10187
+            // and https://github.com/babel/babel/issues/10179 for older @babel/core versions
+            // where #10187 isn't fixed.
+            this.file.declarations["objectSpread2"] = null;
+
             // objectSpread2 has been introduced in v7.5.0
             // We have to maintain backward compatibility.
             helper = file.addHelper("objectSpread");
Workaround #<I> in proposal-object-rest-spread (#<I>)