Check that the size of the array is updated correctly when popping values.