Trim the selection when selected items are removed from the 'foreach' observable array

This makes the tests introduced in #29 pass.