Yes, I understand how and why you've used deferreds instead of callbacks for the messages responses, and I realize it would be easier in this particular case to have the full generality of callbacks. My suggestion is still to do it stupidly with deferreds instead of more generally with recursion. Stick a deferred in `_jsMessageDeferreds` that, when resolved, either resolves `jsDeferred` immediately or replaces it with a second deferred that will resolve `jsDeferred` later. The only advantage is that it would be manifest that there are exactly two cases. (But it still doesn't really matter.)