fixed a bug in neighbour.py

this bug meant that PF failed during clustering when >2 subsets were
equally distant. Identified during routine testing, and now fixed.