See the sample file :
Import a bitmap
Draw a shape and put it behind the bitmap
Apply a filter to the bitmap with a Composite "In" connected to Background image
Group bitmap and shape
Add a new shape behind this group (separated from the group).
At first time you see the filter applied to the group only. But if you refresh the screen (moving anything or panning) then the filter applies also to the last shape drawn behind the group. However if you make a bitmap copy or if you export to bitmap the shape behind isn't shown.
(n.b. I added an outer shadow inside the filter in order to enhance the weirdiness.)
To my sense the shape added after grouping should not inherit the filter effect. But I don't know how it is specified in SVG