I've temporarily reverted D154272 (which this commit depends on) due to a build breakage, so also reverting this for now. This reverts commit c1e28385.