Uplift from https://github.com/mozilla/fireplace/pull/409