Fix regression tests and add tests for empty geometries.