Index out of bounds corrected.

Random test for triangle inequality now fails really rarely. Brute force
isn't really effective to test for this property...