Add support for duplicate shard states in BaseShardManager

This fixes an issue where a connection is not registered if it has multiple ShardState entries.