Issue #2248949 by juliangb: Fix test failures on 7.x-2.x branch.