Fixing set membership

...which seems to be the cause for current problems for the substitution.  I'm not satisfied with the solution, though.