Add a few backports to 0.21 maintenance

Just a few commits we should have for the 0.21.2 release.

I have not included #2539 since it looks like at least lg2s and rugged have codified the wrong behaviour and we might end up breaking stuff if we include it.