I'm going to integrate the patch as-is, doing it in the shim is harder and means that it has to be recalculated on each invocation of the compiler, when we can just do it once here.