Logic for creating list of groups of rectangles that should be 'effected'.