systemed/potlatch2 — pull request #66 by stevage (2012-05-06 14:10:37+00:00)
Title: Fix #3869: centroid calculation was broken for tiny ways. 

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