Add regression test for `children` filtering

The filtering bug exhibited by the `children` method was indirectly
resolved in commit 0464dd8b870e5b2cf04b934d8e79ae5e928a1c6f .