Optimize the test for issue #13454.
Now it requires almost 4x less memory and is almost 2x faster.