We should call the callback no matter how we open/activate the tab, i.e. for all of the three code paths that lead to the tab being activated (two of which involve activating a tab that is already opened). But it isn't obvious how to do this, since you can register a "ready" handler for a tab that isn't ready yet (i.e. that you are opening), but you can't find out whether or not an existing tab is already ready.

We *should* be able to do something like this at the end of *openHelperTab* to call the call back unconditionally on ready:

```
    if (typeof cb === "function") {
      tab.attach({
        contentScript: "",
        onAttach: function() {
          openArgs.onReady = cb;
        }
      });
    }
```

However, I'm having trouble testing this. When I run tests, they hang with:

```
info: r2d2b2g: executing 'r2d2b2g/tests/test-receipts.test receipt update'
error: r2d2b2g: An exception occurred.
undefined: undefined
undefined undefined
Traceback (most recent call last):
```

Even more bizarrely, the tests passed when I ran them the first time (without making any changes to your code). But now they fail even if I revert my changes. Something strange is happening.