Fix double-invert in sql SetCut implementation

When invert=True is passed to the sql implementation of SetCut the conditions are inverted twice resulting in  a wrong expression. This commit makes sure only the combined condition is inverted and not the individual ones.