Fixed export of wrong set of documents AGAIN.
Moved utils to a more local scope in _list/export.
Fixed some variables that are left without initialization.

My scripting style sort-of pretends that variables have block scope, because it
looks more comprehensive to 'declare' a variable within a small block instead
of re-using the existing one. Even though this has no effect.
I also thought, 'var' at least resets its variables back to undefined if they
already exist and no initialization was given. And I was horribly wrong.
Nevertheless in this case it is highly unlikely that 'id' would be identical to
the first array element it is checked against.
Fixed messed up EPSG:3397 coordinates of identical polys.

Because two features could point to the same geometry, utils.eachPoint() ran
over the same coordinates twice which rendered them useless.