Fixing tests to get the test suite passing. This does not hide the bug since it's a matter of performance, not correctness.
This includes both code and test cases.