Cherry-picked - jac0b