net/mlx4_core: Fix potential corruption in counters database