Four new tests for selection update after foreach change

These tests check if A) items removed from foreach are also removed from selection - and B) the inverse too (items that are not removed during a write to foreach should stay selected). The tests for A) fail, for B) pass.

Loosely related to issue #16 though probably needs a fix somewhere else, such as commit #2f39367