Fix nested before filters in groups.
Merge branch '4.0'