c0936fc8e7
The problem was that we did not handle the case correctly when doubling the array was not enough. We need to keep doubling until everything fits in.