Fix domain inversion evaluation of constrained field

The evaluation to True of constrained clause should only be done for inversion.
Also it should be valid even if a wrong value is defined in the context.

issue4073
review14391003
Add export of selection string

issue4036
review14331002