Merging recent changes from the 4.2 branch into trunk.