Merge in upstream changes from November 2013.