Given the standard XML example from the documentation, the following GPath expressions did not return the same result:
The reason is a missing implementation of childNodes() in FilteredNodeChildren.
Merging the code patterns for flattening all the child iterators in NodeChildren and for filtering with the lazy-evaluated closure originally passed to the parent via .findAll() in the existing iterator implementations of FilteredNodeChildren.
The suggested implementation (uploaded) passes all the assert in the documentation example. It also passes these additional asserts, proving that two findAll() filters can be chained and the GPath can be further extended beyond the filter: