We applied MDL-56331 and MDL-56740 to 32 and up, but neglected to apply it to 31.
Although 31 is under security support only, we also want to have passing unit tests wherever possible, and these are causing unit test failures when combined with the PHPUNIT_LONGTEST constant.