Bug 2187: Don't close over internal state in ShardManager