Do not consider siblings' contents when filtering

This should resolve issue #374 .