Add regression test for `children` filtering

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