Cherry-picked commit against latest master