[ms] more planning bug fixes
* fix sourcesterms w/ constant: all occurences of the same constant should be there once one of them is
* fix handling of constant and relation in expand_terms:
* we should always consider system source there for constants
* for relation, we should check its lhs and rhs are in selected terms, not
that the relation is in linkedterms (this has no chance to be true)
This fixes 3 tests that were either passing erroneously (syt should be punished
for copy/paste output as test reulst without triple checking it) or were not
optimal.