Fix broken tests and fix failure when using only one polygon in a multipolygon