Fix another bug in selection subexpression handling.

In this case, it did not work correctly if a variable with a dynamic
value was used both
1. in a boolean expression such that its evaluation group was not known
   in advance, and
2. in a context where it was always evaluated for all atoms (either as
   a selection, or as a parameter to a selection method),
and additionally the latter context appeared later in the selection set.
The initialization of the SEL_CDATA_STATICEVAL flag has a dependency on
SEL_CDATA_FULLEVAL flag, and they were not initialized in the correct
sequence in the above case.

Fixes #1219.

Backported from master with the same Change-Id.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1