Add back commits r219835 and a fixed version of r219829.