I confirm that either removing the identical point from data or fixing the lengthscale as constant and not sampling it resolves the issue.
I thought that since the model assumes non-zero noise, identical points would not cause problems. (Without it the Cholesky factorization would fail.) The problems with the kernel equation did not occur to me.
I guess I will just have to find some way to deal with identical data.
Thank you both for your time and help. I’m marking the problem as solved.