Cross-measure values: fix stemmed-stemless shape changes

When, because of the cross-measure value setting, notes change from stemmed to stemless (or vice versa), stems are not properly removed or added.