Moved an unnecessarily global variable into set-polygons-buffer.