Make sure SmartCoin knows of its HdPubKey too.
MODIFY
WalletWasabi/Blockchain/Keys/HdPubKey.cs
WalletWasabi/Blockchain/Keys/HdPubKey.cs
using NBitcoin;
using Newtonsoft.Json;
using System;
+using System.Collections.Generic;
using System.Linq;
using WalletWasabi.Blockchain.Analysis.Clustering;
+using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Helpers;
using WalletWasabi.JsonConverters;
@@ -44,6 +46,8 @@ namespace WalletWasabi.Blockchain.Keys
}
}
+ public HashSet<SmartCoin> Coins { get; } = new HashSet<SmartCoin>();
+
[JsonProperty(Order = 1)]
[JsonConverter(typeof(PubKeyJsonConverter))]
public PubKey PubKey { get; }

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
@@ -53,6 +53,8 @@ namespace WalletWasabi.Blockchain.TransactionOutputs
HdPubKey = pubKey;
_cluster = new Cluster(this);
+
+ HdPubKey.Coins.Add(this);
Transaction.WalletOutputs.Add(this);
}

Make sure SmartCoin knows of its HdPubKey too.