Return ambiguous, rather than undefined, centroid.

This is a fix for #1039, and related to #1037 #1011.