gdi: don't pollute invalid region with empty rects