Remove group when the elements don't match the filter condition anymore
OCD
Added test