fix FS#914 - Invert selection: poor performance