Apply patches from 2335879 and 1869548.