Backport of 780473d756 from master
780473d756
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Backport of d522b51c40 from master
d522b51c40
Co-authored-by: elky <elky@users.noreply.github.com> Co-authored-by: Goetz <goetz.buerkle@gmail.com>