[nomaster] backports 609047ba37

review @retronym @gkossakowski