Fix regression that removed `addon` global.

- Write tests to catch such regressions in a future.
Merge pull request #1005 from Gozala/bug/addon-global@874152

Bug 874152 - Fix regression that removed `addon` global.