ERT-736: Fixed rng realloc bug