I have run your code with some added logging and the issue is exactly what I meant in my comment.
If you hit the same cell (row, col) twice, but with a different random value, noConflict
returns true
and the old value gets overriden.
You should check that the cell is empty in your noConflict
method.