Fixed some merge problems and unit test failures following merge from
1.12.