Merge in J.Layton patch and resolve conflict.