Fixes for https://github.com/mozilla-b2g/gaia/pull/22677 (WIP).
More fixes for https://github.com/mozilla-b2g/gaia/pull/22677 (WIP).