Fix issue where in-memory tests left running processes.
Make sure shards aren't nested in DSL.