Automatically filter by namespaces when possible.