Thank you @rwjblue and @ef4 ember-cli-babel@7.20.1 solves the problem. Would it be good idea to upgrade the ember version to 3.16.0 which is also solving the problem in my case.
I think ember-cli-babel is broadly backward compatible though. While updating is always good, I don’t think people need to update ember to get this bugfix.
FWIW, another set of fixes has been released in ember-cli-babel@7.20.5 that fix another category of bugs (this issue was actually introduced in 7.20.1).
Also, you do not need to be on the latest ember-cli-babel to get these fixes, you need the latest babel-plugin-ember-modules-api-polyfill. The easiest way to get that is to update your ember-cli-babel version, but you can update it in other ways as well (including for transitive dependencies that you do not directly have control over).
For example, yarn users can do the following:
Add the following to your package.json’s resolutions field: