Add sanity checks to ID optimizations
Add sanity checks to ID optimizations

MrStrong/Sia,mharkus/Sia,ericflo/Sia,ChrisSchinnerl/Sia,NebulousLabs/Sia,NebulousLabs/Sia,MrStrong/Sia,mharkus/Sia,mtlynch/Sia,mtlynch/Sia,ChrisSchinnerl/Sia,ericflo/Sia