Fixed bug in Triangles energy/gradient calculation that error'ed out when there were points without neighborhoods.