Fix #3869: centroid calculation was broken for tiny ways. 

Thanks Jeffrey Sax at StackOverflow for the answer - rearranging terms did the trick.